1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 #ifndef CHROME_BROWSER_UI_VIEWS_BROWSER_DIALOGS_H_ 6 #define CHROME_BROWSER_UI_VIEWS_BROWSER_DIALOGS_H_ 7 8 #include "base/callback_forward.h" 9 #include "ui/gfx/native_widget_types.h" 10 11 // This file contains functions for running a variety of browser dialogs and 12 // popups. The dialogs here are the ones that the caller does not need to 13 // access the class of the popup. It allows us to break dependencies by 14 // allowing the callers to not depend on the classes implementing the dialogs. 15 // TODO: Make as many of these methods as possible cross platform, and move them 16 // into chrome/browser/ui/browser_dialogs.h. 17 18 class BrowserView; 19 class EditSearchEngineControllerDelegate; 20 class FindBar; 21 class Profile; 22 class TemplateURL; 23 24 namespace chrome { 25 26 // Creates and returns a find bar for the given browser window. See FindBarWin. 27 FindBar* CreateFindBar(BrowserView* browser_view); 28 29 // Shows a dialog box that allows a search engine to be edited. |template_url| 30 // is the search engine being edited. If it is NULL, then the dialog will add a 31 // new search engine with the data the user supplies. |delegate| is an object 32 // to be notified when the user is done editing, or NULL. If NULL, the dialog 33 // will update the model with the user's edits directly. 34 void EditSearchEngine(gfx::NativeWindow parent, 35 TemplateURL* template_url, 36 EditSearchEngineControllerDelegate* delegate, 37 Profile* profile); 38 39 } // namespace chrome 40 41 #endif // CHROME_BROWSER_UI_VIEWS_BROWSER_DIALOGS_H_ 42