Disable view source for Developer Tools.
[chromium-blink-merge.git] / chrome / browser / ui / browser_dialogs.h
bloba1f96a67d19e876c440dd793c57416bc06c56d4d
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_BROWSER_DIALOGS_H_
6 #define CHROME_BROWSER_UI_BROWSER_DIALOGS_H_
8 #include "base/callback.h"
9 #include "ipc/ipc_message.h" // For IPC_MESSAGE_LOG_ENABLED.
10 #include "third_party/skia/include/core/SkColor.h"
11 #include "ui/gfx/native_widget_types.h"
13 class Browser;
14 class Profile;
15 class SkBitmap;
16 class TabModalConfirmDialogDelegate;
18 namespace content {
19 class BrowserContext;
20 class ColorChooser;
21 class WebContents;
24 namespace extensions {
25 class Extension;
28 namespace ui {
29 class ProfileSigninConfirmationDelegate;
30 class WebDialogDelegate;
33 namespace chrome {
35 #if defined(IPC_MESSAGE_LOG_ENABLED)
37 // The dialog is a singleton. If the dialog is already opened, it won't do
38 // anything, so you can just blindly call this function all you want.
39 // This is called from chrome/browser/browser_about_handler.cc
40 void ShowAboutIPCDialog();
42 #endif // IPC_MESSAGE_LOG_ENABLED
44 // Creates and shows an HTML dialog with the given delegate and context.
45 // The window is automatically destroyed when it is closed.
46 // Returns the created window.
48 // Make sure to use the returned window only when you know it is safe
49 // to do so, i.e. before OnDialogClosed() is called on the delegate.
50 gfx::NativeWindow ShowWebDialog(gfx::NativeWindow parent,
51 content::BrowserContext* context,
52 ui::WebDialogDelegate* delegate);
54 // Shows the collected cookies dialog box.
55 void ShowCollectedCookiesDialog(content::WebContents* web_contents);
57 // Creates the ExtensionInstalledBubble and schedules it to be shown once
58 // the extension has loaded. |extension| is the installed extension. |browser|
59 // is the browser window which will host the bubble. |icon| is the install
60 // icon of the extension.
61 void ShowExtensionInstalledBubble(const extensions::Extension* extension,
62 Browser* browser,
63 const SkBitmap& icon);
65 // Shows or hide the hung renderer dialog for the given WebContents.
66 // We need to pass the WebContents to the dialog, because multiple tabs can hang
67 // and it needs to keep track of which tabs are currently hung.
68 void ShowHungRendererDialog(content::WebContents* contents);
69 void HideHungRendererDialog(content::WebContents* contents);
71 // Shows the Task Manager. |browser| can be NULL when called from Ash.
72 void ShowTaskManager(Browser* browser);
74 #if !defined(OS_MACOSX)
75 // Shows the create web app shortcut dialog box.
76 void ShowCreateWebAppShortcutsDialog(gfx::NativeWindow parent_window,
77 content::WebContents* web_contents);
78 #endif
80 // Shows the create chrome app shortcut dialog box.
81 // On Mac, this creates a shortcut without prompting.
82 // |close_callback| may be null.
83 void ShowCreateChromeAppShortcutsDialog(gfx::NativeWindow parent_window,
84 Profile* profile,
85 const extensions::Extension* app,
86 const base::Closure& close_callback);
88 // Shows a color chooser that reports to the given WebContents.
89 content::ColorChooser* ShowColorChooser(content::WebContents* web_contents,
90 SkColor initial_color);
92 void ShowProfileSigninConfirmationDialog(
93 Browser* browser,
94 content::WebContents* web_contents,
95 Profile* profile,
96 const std::string& username,
97 ui::ProfileSigninConfirmationDelegate* delegate);
100 // Shows the Desktop User Manager with the |profile_path_to_focus| user focused.
101 void ShowUserManager(const base::FilePath& profile_path_to_focus);
103 // Hides the User Manager.
104 void HideUserManager();
106 } // namespace chrome
108 #endif // CHROME_BROWSER_UI_BROWSER_DIALOGS_H_