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.
5 #ifndef CHROME_BROWSER_UI_VIEWS_BROWSER_DIALOGS_H_
6 #define CHROME_BROWSER_UI_VIEWS_BROWSER_DIALOGS_H_
8 #include "base/memory/scoped_ptr.h"
9 #include "ui/gfx/native_widget_types.h"
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.
18 class BookmarkBubbleDelegate
;
19 class BookmarkBubbleViewObserver
;
22 class EditSearchEngineControllerDelegate
;
28 namespace extensions
{
38 // Shows or hides the bookmark bubble anchored to the supplied view.
39 void ShowBookmarkBubbleView(views::View
* anchor_view
,
40 BookmarkBubbleViewObserver
* observer
,
41 scoped_ptr
<BookmarkBubbleDelegate
> delegate
,
44 bool newly_bookmarked
);
45 void HideBookmarkBubbleView();
46 bool IsBookmarkBubbleViewShowing();
48 // Creates and returns a find bar for the given browser window. See FindBarWin.
49 FindBar
* CreateFindBar(BrowserView
* browser_view
);
51 // Shows a dialog box that allows a search engine to be edited. |template_url|
52 // is the search engine being edited. If it is NULL, then the dialog will add a
53 // new search engine with the data the user supplies. |delegate| is an object
54 // to be notified when the user is done editing, or NULL. If NULL, the dialog
55 // will update the model with the user's edits directly.
56 void EditSearchEngine(gfx::NativeWindow parent
,
57 TemplateURL
* template_url
,
58 EditSearchEngineControllerDelegate
* delegate
,
61 // Shows the create chrome app shortcut dialog box.
62 void ShowCreateChromeAppShortcutsDialog(
63 gfx::NativeWindow parent_window
,
65 const extensions::Extension
* app
,
66 const base::Closure
& close_callback
);
70 #endif // CHROME_BROWSER_UI_VIEWS_BROWSER_DIALOGS_H_