1// Copyright (c) 2011 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#pragma once 8 9#include <string> 10 11#include "ui/gfx/native_widget_types.h" 12 13// This file contains functions for running a variety of browser dialogs and 14// popups. The dialogs here are the ones that the caller does not need to 15// access the class of the popup. It allows us to break dependencies by 16// allowing the callers to not depend on the classes implementing the dialogs. 17// TODO: Make as many of these methods as possible cross platform, and move them 18// into chrome/browser/ui/browser_dialogs.h. 19 20class BrowserView; 21class EditSearchEngineControllerDelegate; 22class Extension; 23class FindBar; 24class GURL; 25class BubbleDelegate; 26class Profile; 27class TabContents; 28class TabContentsWrapper; 29class TemplateURL; 30 31namespace gfx { 32class Rect; 33class Size; 34} 35 36namespace views { 37class Window; 38} 39 40namespace browser { 41 42// Shows or hides the global bookmark bubble for the star button. 43void ShowBookmarkBubbleView(views::Window* parent, 44 const gfx::Rect& bounds, 45 BubbleDelegate* delegate, 46 Profile* profile, 47 const GURL& url, 48 bool newly_bookmarked); 49void HideBookmarkBubbleView(); 50bool IsBookmarkBubbleViewShowing(); 51 52// Shows the about dialog. See AboutChromeView. 53views::Window* ShowAboutChromeView(gfx::NativeWindow parent, 54 Profile* profile); 55 56// Creates and returns a find bar for the given browser window. See FindBarWin. 57FindBar* CreateFindBar(BrowserView* browser_view); 58 59// Shows the Task Manager. 60void ShowTaskManager(); 61 62// Shows the Task Manager, highlighting the background pages. 63void ShowBackgroundPages(); 64 65#if defined(OS_CHROMEOS) 66// Shows the Login Wizard. 67void ShowLoginWizard(const std::string& start_screen, const gfx::Size& size); 68#endif 69 70// Shows a dialog box that allows a search engine to be edited. |template_url| 71// is the search engine being edited. If it is NULL, then the dialog will add a 72// new search engine with the data the user supplies. |delegate| is an object 73// to be notified when the user is done editing, or NULL. If NULL, the dialog 74// will update the model with the user's edits directly. 75void EditSearchEngine(gfx::NativeWindow parent, 76 const TemplateURL* template_url, 77 EditSearchEngineControllerDelegate* delegate, 78 Profile* profile); 79 80// Shows the repost form confirmation dialog box. 81void ShowRepostFormWarningDialog(gfx::NativeWindow parent_window, 82 TabContents* tab_contents); 83 84// Shows the collected cookies dialog box. 85void ShowCollectedCookiesDialog(gfx::NativeWindow parent_window, 86 TabContents* tab_contents); 87 88 89// Shows the create web app shortcut dialog box. 90void ShowCreateWebAppShortcutsDialog(gfx::NativeWindow parent_window, 91 TabContentsWrapper* tab_contents); 92 93// Shows the create chrome app shortcut dialog box. 94void ShowCreateChromeAppShortcutsDialog(gfx::NativeWindow parent_window, 95 Profile* profile, 96 const Extension* app); 97 98} // namespace browser 99 100#endif // CHROME_BROWSER_UI_VIEWS_BROWSER_DIALOGS_H_ 101