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 "third_party/skia/include/core/SkColor.h"
10 #include "ui/gfx/native_widget_types.h"
22 namespace extensions
{
27 class WebDialogDelegate
;
32 // Creates and shows an HTML dialog with the given delegate and context.
33 // The window is automatically destroyed when it is closed.
34 // Returns the created window.
36 // Make sure to use the returned window only when you know it is safe
37 // to do so, i.e. before OnDialogClosed() is called on the delegate.
38 gfx::NativeWindow
ShowWebDialog(gfx::NativeView parent
,
39 content::BrowserContext
* context
,
40 ui::WebDialogDelegate
* delegate
);
42 // Creates the ExtensionInstalledBubble and schedules it to be shown once
43 // the extension has loaded. |extension| is the installed extension. |browser|
44 // is the browser window which will host the bubble. |icon| is the install
45 // icon of the extension.
46 void ShowExtensionInstalledBubble(const extensions::Extension
* extension
,
48 const SkBitmap
& icon
);
50 // Shows or hides the Task Manager. |browser| can be NULL when called from Ash.
51 void ShowTaskManager(Browser
* browser
);
52 void HideTaskManager();
54 #if !defined(OS_MACOSX)
55 // Shows the create web app shortcut dialog box.
56 void ShowCreateWebAppShortcutsDialog(gfx::NativeWindow parent_window
,
57 content::WebContents
* web_contents
);
60 // Shows the create chrome app shortcut dialog box.
61 // |close_callback| may be null.
62 void ShowCreateChromeAppShortcutsDialog(
63 gfx::NativeWindow parent_window
,
65 const extensions::Extension
* app
,
66 const base::Callback
<void(bool /* created */)>& close_callback
);
68 // Shows a color chooser that reports to the given WebContents.
69 content::ColorChooser
* ShowColorChooser(content::WebContents
* web_contents
,
70 SkColor initial_color
);
74 #endif // CHROME_BROWSER_UI_BROWSER_DIALOGS_H_