| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_UI_BROWSER_DIALOGS_H_ | 5 #ifndef CHROME_BROWSER_UI_BROWSER_DIALOGS_H_ |
| 6 #define CHROME_BROWSER_UI_BROWSER_DIALOGS_H_ | 6 #define CHROME_BROWSER_UI_BROWSER_DIALOGS_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "chrome/browser/ui/dialog_style.h" | 9 #include "chrome/browser/ui/dialog_style.h" |
| 10 #include "ipc/ipc_message.h" | 10 #include "ipc/ipc_message.h" |
| 11 #include "ui/gfx/native_widget_types.h" | 11 #include "ui/gfx/native_widget_types.h" |
| 12 | 12 |
| 13 class Browser; | 13 class Browser; |
| 14 class Extension; | 14 class Extension; |
| 15 class HtmlDialogUIDelegate; | |
| 16 class Profile; | 15 class Profile; |
| 17 class SkBitmap; | 16 class SkBitmap; |
| 18 class TabContentsWrapper; | 17 class TabContentsWrapper; |
| 19 class TabModalConfirmDialogDelegate; | 18 class TabModalConfirmDialogDelegate; |
| 20 class TemplateURL; | 19 class TemplateURL; |
| 20 class WebDialogDelegate; |
| 21 | 21 |
| 22 namespace content { | 22 namespace content { |
| 23 class WebContents; | 23 class WebContents; |
| 24 } | 24 } |
| 25 | 25 |
| 26 namespace browser { | 26 namespace browser { |
| 27 | 27 |
| 28 #if defined(IPC_MESSAGE_LOG_ENABLED) | 28 #if defined(IPC_MESSAGE_LOG_ENABLED) |
| 29 | 29 |
| 30 // The dialog is a singleton. If the dialog is already opened, it won't do | 30 // The dialog is a singleton. If the dialog is already opened, it won't do |
| 31 // anything, so you can just blindly call this function all you want. | 31 // anything, so you can just blindly call this function all you want. |
| 32 // This is Called from chrome/browser/browser_about_handler.cc | 32 // This is Called from chrome/browser/browser_about_handler.cc |
| 33 void ShowAboutIPCDialog(); | 33 void ShowAboutIPCDialog(); |
| 34 | 34 |
| 35 #endif // IPC_MESSAGE_LOG_ENABLED | 35 #endif // IPC_MESSAGE_LOG_ENABLED |
| 36 | 36 |
| 37 // Creates and shows an HTML dialog with the given delegate and profile. | 37 // Creates and shows an HTML dialog with the given delegate and profile. |
| 38 // The window is automatically destroyed when it is closed. |browser| can be | 38 // The window is automatically destroyed when it is closed. |browser| can be |
| 39 // NULL if the profile used is not incognito, otherwise the window will be | 39 // NULL if the profile used is not incognito, otherwise the window will be |
| 40 // closed if the browser is closed. | 40 // closed if the browser is closed. |
| 41 // Returns the created window. | 41 // Returns the created window. |
| 42 // | 42 // |
| 43 // Make sure to use the returned window only when you know it is safe | 43 // Make sure to use the returned window only when you know it is safe |
| 44 // to do so, i.e. before OnDialogClosed() is called on the delegate. | 44 // to do so, i.e. before OnDialogClosed() is called on the delegate. |
| 45 gfx::NativeWindow ShowHtmlDialog(gfx::NativeWindow parent, | 45 gfx::NativeWindow ShowWebDialog(gfx::NativeWindow parent, |
| 46 Profile* profile, | 46 Profile* profile, |
| 47 Browser* browser, | 47 Browser* browser, |
| 48 HtmlDialogUIDelegate* delegate, | 48 WebDialogDelegate* delegate, |
| 49 DialogStyle style); | 49 DialogStyle style); |
| 50 | 50 |
| 51 // Closes the given dialog. | 51 // Closes the given dialog. |
| 52 void CloseHtmlDialog(gfx::NativeWindow window); | 52 void CloseHtmlDialog(gfx::NativeWindow window); |
| 53 | 53 |
| 54 // Shows the collected cookies dialog box. | 54 // Shows the collected cookies dialog box. |
| 55 void ShowCollectedCookiesDialog(gfx::NativeWindow parent_window, | 55 void ShowCollectedCookiesDialog(gfx::NativeWindow parent_window, |
| 56 TabContentsWrapper* tab_contents); | 56 TabContentsWrapper* tab_contents); |
| 57 | 57 |
| 58 // Creates the ExtensionInstalledBubble and schedules it to be shown once | 58 // Creates the ExtensionInstalledBubble and schedules it to be shown once |
| 59 // the extension has loaded. |extension| is the installed extension. |browser| | 59 // the extension has loaded. |extension| is the installed extension. |browser| |
| (...skipping 10 matching lines...) Expand all Loading... |
| 70 void ShowHungRendererDialog(content::WebContents* contents); | 70 void ShowHungRendererDialog(content::WebContents* contents); |
| 71 void HideHungRendererDialog(content::WebContents* contents); | 71 void HideHungRendererDialog(content::WebContents* contents); |
| 72 | 72 |
| 73 // Shows a tab-modal dialog box. | 73 // Shows a tab-modal dialog box. |
| 74 void ShowTabModalConfirmDialog(TabModalConfirmDialogDelegate* delegate, | 74 void ShowTabModalConfirmDialog(TabModalConfirmDialogDelegate* delegate, |
| 75 TabContentsWrapper* wrapper); | 75 TabContentsWrapper* wrapper); |
| 76 | 76 |
| 77 } // namespace browser | 77 } // namespace browser |
| 78 | 78 |
| 79 #endif // CHROME_BROWSER_UI_BROWSER_DIALOGS_H_ | 79 #endif // CHROME_BROWSER_UI_BROWSER_DIALOGS_H_ |
| OLD | NEW |