| 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 "ipc/ipc_message.h" | 9 #include "ipc/ipc_message.h" |
| 10 #include "ui/gfx/native_widget_types.h" | 10 #include "ui/gfx/native_widget_types.h" |
| 11 | 11 |
| 12 class Browser; | 12 class Browser; |
| 13 class Profile; | 13 class Profile; |
| 14 class SkBitmap; | 14 class SkBitmap; |
| 15 class TabContents; | 15 class TabContents; |
| 16 typedef TabContents TabContentsWrapper; | |
| 17 class TabModalConfirmDialogDelegate; | 16 class TabModalConfirmDialogDelegate; |
| 18 class TemplateURL; | 17 class TemplateURL; |
| 19 | 18 |
| 20 namespace content { | 19 namespace content { |
| 21 class WebContents; | 20 class WebContents; |
| 22 } | 21 } |
| 23 | 22 |
| 24 namespace extensions { | 23 namespace extensions { |
| 25 class Extension; | 24 class Extension; |
| 26 } | 25 } |
| (...skipping 21 matching lines...) Expand all Loading... |
| 48 // | 47 // |
| 49 // Make sure to use the returned window only when you know it is safe | 48 // 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. | 49 // to do so, i.e. before OnDialogClosed() is called on the delegate. |
| 51 gfx::NativeWindow ShowWebDialog(gfx::NativeWindow parent, | 50 gfx::NativeWindow ShowWebDialog(gfx::NativeWindow parent, |
| 52 Profile* profile, | 51 Profile* profile, |
| 53 Browser* browser, | 52 Browser* browser, |
| 54 ui::WebDialogDelegate* delegate); | 53 ui::WebDialogDelegate* delegate); |
| 55 | 54 |
| 56 // Shows the collected cookies dialog box. | 55 // Shows the collected cookies dialog box. |
| 57 void ShowCollectedCookiesDialog(gfx::NativeWindow parent_window, | 56 void ShowCollectedCookiesDialog(gfx::NativeWindow parent_window, |
| 58 TabContentsWrapper* tab_contents); | 57 TabContents* tab_contents); |
| 59 | 58 |
| 60 // Creates the ExtensionInstalledBubble and schedules it to be shown once | 59 // Creates the ExtensionInstalledBubble and schedules it to be shown once |
| 61 // the extension has loaded. |extension| is the installed extension. |browser| | 60 // the extension has loaded. |extension| is the installed extension. |browser| |
| 62 // is the browser window which will host the bubble. |icon| is the install | 61 // is the browser window which will host the bubble. |icon| is the install |
| 63 // icon of the extension. | 62 // icon of the extension. |
| 64 void ShowExtensionInstalledBubble(const extensions::Extension* extension, | 63 void ShowExtensionInstalledBubble(const extensions::Extension* extension, |
| 65 Browser* browser, | 64 Browser* browser, |
| 66 const SkBitmap& icon, | 65 const SkBitmap& icon, |
| 67 Profile* profile); | 66 Profile* profile); |
| 68 | 67 |
| 69 // Shows or hide the hung renderer dialog for the given WebContents. | 68 // Shows or hide the hung renderer dialog for the given WebContents. |
| 70 // We need to pass the WebContents to the dialog, because multiple tabs can hang | 69 // We need to pass the WebContents to the dialog, because multiple tabs can hang |
| 71 // and it needs to keep track of which tabs are currently hung. | 70 // and it needs to keep track of which tabs are currently hung. |
| 72 void ShowHungRendererDialog(content::WebContents* contents); | 71 void ShowHungRendererDialog(content::WebContents* contents); |
| 73 void HideHungRendererDialog(content::WebContents* contents); | 72 void HideHungRendererDialog(content::WebContents* contents); |
| 74 | 73 |
| 75 // Shows a tab-modal dialog box. | 74 // Shows a tab-modal dialog box. |
| 76 void ShowTabModalConfirmDialog(TabModalConfirmDialogDelegate* delegate, | 75 void ShowTabModalConfirmDialog(TabModalConfirmDialogDelegate* delegate, |
| 77 TabContentsWrapper* wrapper); | 76 TabContents* tab_contents); |
| 78 | 77 |
| 79 } // namespace browser | 78 } // namespace browser |
| 80 | 79 |
| 81 #endif // CHROME_BROWSER_UI_BROWSER_DIALOGS_H_ | 80 #endif // CHROME_BROWSER_UI_BROWSER_DIALOGS_H_ |
| OLD | NEW |