browser_dialogs.h revision 9ab5563a3196760eb381d102cbb2bc0f7abc6a50
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 "ui/gfx/native_widget_types.h" 9 10// This file contains functions for running a variety of browser dialogs and 11// popups. The dialogs here are the ones that the caller does not need to 12// access the class of the popup. It allows us to break dependencies by 13// allowing the callers to not depend on the classes implementing the dialogs. 14// TODO: Make as many of these methods as possible cross platform, and move them 15// into chrome/browser/ui/browser_dialogs.h. 16 17class BookmarkBubbleViewObserver; 18class Browser; 19class BrowserView; 20class EditSearchEngineControllerDelegate; 21class FindBar; 22class GURL; 23class Profile; 24class TemplateURL; 25 26namespace extensions { 27class Extension; 28} 29 30namespace views { 31class View; 32} 33 34namespace chrome { 35 36// Shows or hides the bookmark bubble anchored to the supplied view. 37void ShowBookmarkBubbleView(views::View* anchor_view, 38 BookmarkBubbleViewObserver* observer, 39 Profile* profile, 40 const GURL& url, 41 bool newly_bookmarked); 42void HideBookmarkBubbleView(); 43bool IsBookmarkBubbleViewShowing(); 44 45// Creates and returns a find bar for the given browser window. See FindBarWin. 46FindBar* CreateFindBar(BrowserView* browser_view); 47 48// Shows a dialog box that allows a search engine to be edited. |template_url| 49// is the search engine being edited. If it is NULL, then the dialog will add a 50// new search engine with the data the user supplies. |delegate| is an object 51// to be notified when the user is done editing, or NULL. If NULL, the dialog 52// will update the model with the user's edits directly. 53void EditSearchEngine(gfx::NativeWindow parent, 54 TemplateURL* template_url, 55 EditSearchEngineControllerDelegate* delegate, 56 Profile* profile); 57 58// Shows the create chrome app shortcut dialog box. 59void ShowCreateChromeAppShortcutsDialog(gfx::NativeWindow parent_window, 60 Profile* profile, 61 const extensions::Extension* app); 62 63} // namespace chrome 64 65#endif // CHROME_BROWSER_UI_VIEWS_BROWSER_DIALOGS_H_ 66