[email protected] | c96531e8 | 2011-01-26 03:11:14 | [diff] [blame] | 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_BROWSER_DIALOGS_H_ |
| 6 | #define CHROME_BROWSER_UI_BROWSER_DIALOGS_H_ |
| 7 | #pragma once |
| 8 | |
| 9 | #include "ipc/ipc_message.h" |
[email protected] | 08397d5 | 2011-02-05 01:53:38 | [diff] [blame] | 10 | #include "ui/gfx/native_widget_types.h" |
[email protected] | c96531e8 | 2011-01-26 03:11:14 | [diff] [blame] | 11 | |
[email protected] | c60e248 | 2011-02-11 23:46:32 | [diff] [blame^] | 12 | class Browser; |
| 13 | class Extension; |
| 14 | class ImporterHost; |
[email protected] | eb2d790 | 2011-02-02 18:19:56 | [diff] [blame] | 15 | class HtmlDialogUIDelegate; |
| 16 | class Profile; |
[email protected] | c60e248 | 2011-02-11 23:46:32 | [diff] [blame^] | 17 | class SkBitmap; |
[email protected] | eb2d790 | 2011-02-02 18:19:56 | [diff] [blame] | 18 | |
[email protected] | c96531e8 | 2011-01-26 03:11:14 | [diff] [blame] | 19 | namespace browser { |
| 20 | |
| 21 | #if defined(IPC_MESSAGE_LOG_ENABLED) |
| 22 | |
| 23 | // The dialog is a singleton. If the dialog is already opened, it won't do |
| 24 | // anything, so you can just blindly call this function all you want. |
| 25 | // This is Called from chrome/browser/browser_about_handler.cc |
| 26 | void ShowAboutIPCDialog(); |
| 27 | |
| 28 | #endif // IPC_MESSAGE_LOG_ENABLED |
| 29 | |
[email protected] | eb2d790 | 2011-02-02 18:19:56 | [diff] [blame] | 30 | // Creates and shows an HTML dialog with the given delegate and profile. |
| 31 | // The window is automatically destroyed when it is closed. |
| 32 | // Returns the created window. |
| 33 | // |
| 34 | // Make sure to use the returned window only when you know it is safe |
| 35 | // to do so, i.e. before OnDialogClosed() is called on the delegate. |
| 36 | gfx::NativeWindow ShowHtmlDialog(gfx::NativeWindow parent, Profile* profile, |
| 37 | HtmlDialogUIDelegate* delegate); |
| 38 | |
[email protected] | 02c2d5c | 2011-02-10 21:51:34 | [diff] [blame] | 39 | // This function is called by an ImporterHost, and displays the Firefox profile |
| 40 | // locked warning by creating a dialog. On the closing of the dialog, the |
| 41 | // ImportHost receives a callback with the message either to skip the import, |
| 42 | // or to try again. |
| 43 | void ShowImportLockDialog(gfx::NativeWindow parent, |
| 44 | ImporterHost* importer_host); |
| 45 | |
[email protected] | c60e248 | 2011-02-11 23:46:32 | [diff] [blame^] | 46 | // Creates the ExtensionInstalledBubble and schedules it to be shown once |
| 47 | // the extension has loaded. |extension| is the installed extension. |browser| |
| 48 | // is the browser window which will host the bubble. |icon| is the install |
| 49 | // icon of the extension. |
| 50 | void ShowExtensionInstalledBubble(const Extension* extension, |
| 51 | Browser* browser, |
| 52 | SkBitmap icon, |
| 53 | Profile* profile); |
| 54 | |
[email protected] | c96531e8 | 2011-01-26 03:11:14 | [diff] [blame] | 55 | } // namespace browser |
| 56 | |
| 57 | #endif // CHROME_BROWSER_UI_BROWSER_DIALOGS_H_ |