NaCl: Update revision in DEPS, r12770 -> r12773
[chromium-blink-merge.git] / chrome / browser / ui / browser_dialogs.h
blob98c55145adee35154e66601b38441ac78349cb99
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 "content/public/common/signed_certificate_timestamp_id_and_status.h"
10 #include "ipc/ipc_message.h" // For IPC_MESSAGE_LOG_ENABLED.
11 #include "third_party/skia/include/core/SkColor.h"
12 #include "ui/gfx/native_widget_types.h"
14 class Browser;
15 class Profile;
16 class SkBitmap;
17 class TabModalConfirmDialogDelegate;
19 namespace content {
20 class BrowserContext;
21 class ColorChooser;
22 class WebContents;
25 namespace extensions {
26 class Extension;
29 namespace ui {
30 class ProfileSigninConfirmationDelegate;
31 class WebDialogDelegate;
34 namespace chrome {
36 #if defined(IPC_MESSAGE_LOG_ENABLED)
38 // The dialog is a singleton. If the dialog is already opened, it won't do
39 // anything, so you can just blindly call this function all you want.
40 // This is called from chrome/browser/browser_about_handler.cc
41 void ShowAboutIPCDialog();
43 #endif // IPC_MESSAGE_LOG_ENABLED
45 // Creates and shows an HTML dialog with the given delegate and context.
46 // The window is automatically destroyed when it is closed.
47 // Returns the created window.
49 // Make sure to use the returned window only when you know it is safe
50 // to do so, i.e. before OnDialogClosed() is called on the delegate.
51 gfx::NativeWindow ShowWebDialog(gfx::NativeWindow parent,
52 content::BrowserContext* context,
53 ui::WebDialogDelegate* delegate);
55 // Shows the collected cookies dialog box.
56 void ShowCollectedCookiesDialog(content::WebContents* web_contents);
58 // Creates the ExtensionInstalledBubble and schedules it to be shown once
59 // the extension has loaded. |extension| is the installed extension. |browser|
60 // is the browser window which will host the bubble. |icon| is the install
61 // icon of the extension.
62 void ShowExtensionInstalledBubble(const extensions::Extension* extension,
63 Browser* browser,
64 const SkBitmap& icon);
66 // Shows or hide the hung renderer dialog for the given WebContents.
67 // We need to pass the WebContents to the dialog, because multiple tabs can hang
68 // and it needs to keep track of which tabs are currently hung.
69 void ShowHungRendererDialog(content::WebContents* contents);
70 void HideHungRendererDialog(content::WebContents* contents);
72 // Shows the Task Manager. |browser| can be NULL when called from Ash.
73 void ShowTaskManager(Browser* browser);
75 #if !defined(OS_MACOSX)
76 // Shows the create web app shortcut dialog box.
77 void ShowCreateWebAppShortcutsDialog(gfx::NativeWindow parent_window,
78 content::WebContents* web_contents);
79 #endif
81 // Shows the create chrome app shortcut dialog box.
82 // On Mac, this creates a shortcut without prompting.
83 // |close_callback| may be null.
84 void ShowCreateChromeAppShortcutsDialog(gfx::NativeWindow parent_window,
85 Profile* profile,
86 const extensions::Extension* app,
87 const base::Closure& close_callback);
89 // Shows a color chooser that reports to the given WebContents.
90 content::ColorChooser* ShowColorChooser(content::WebContents* web_contents,
91 SkColor initial_color);
93 void ShowProfileSigninConfirmationDialog(
94 Browser* browser,
95 content::WebContents* web_contents,
96 Profile* profile,
97 const std::string& username,
98 ui::ProfileSigninConfirmationDelegate* delegate);
101 // Shows the Desktop User Manager with the |profile_path_to_focus| user focused.
102 void ShowUserManager(const base::FilePath& profile_path_to_focus);
104 // Hides the User Manager.
105 void HideUserManager();
107 // Shows the Signed Certificate Timestamps viewer, to view the signed
108 // certificate timestamps in |sct_ids_list|
109 void ShowSignedCertificateTimestampsViewer(
110 content::WebContents* web_contents,
111 const content::SignedCertificateTimestampIDStatusList& sct_ids_list);
113 } // namespace chrome
115 #endif // CHROME_BROWSER_UI_BROWSER_DIALOGS_H_