| 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" // For IPC_MESSAGE_LOG_ENABLED. | 9 #include "ipc/ipc_message.h" // For IPC_MESSAGE_LOG_ENABLED. |
| 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 SkBitmap; | 13 class SkBitmap; |
| 14 class TabContents; | 14 class TabContents; |
| 15 class TabModalConfirmDialogDelegate; | 15 class TabModalConfirmDialogDelegate; |
| 16 class TemplateURL; | |
| 17 | 16 |
| 18 namespace content { | 17 namespace content { |
| 19 class BrowserContext; | 18 class BrowserContext; |
| 20 class WebContents; | 19 class WebContents; |
| 21 } | 20 } |
| 22 | 21 |
| 23 namespace extensions { | 22 namespace extensions { |
| 24 class Extension; | 23 class Extension; |
| 25 } | 24 } |
| 26 | 25 |
| 27 namespace ui { | 26 namespace ui { |
| 28 class WebDialogDelegate; | 27 class WebDialogDelegate; |
| 29 } | 28 } |
| 30 | 29 |
| 31 namespace browser { | 30 namespace chrome { |
| 32 | 31 |
| 33 #if defined(IPC_MESSAGE_LOG_ENABLED) | 32 #if defined(IPC_MESSAGE_LOG_ENABLED) |
| 34 | 33 |
| 35 // The dialog is a singleton. If the dialog is already opened, it won't do | 34 // The dialog is a singleton. If the dialog is already opened, it won't do |
| 36 // anything, so you can just blindly call this function all you want. | 35 // anything, so you can just blindly call this function all you want. |
| 37 // This is Called from chrome/browser/browser_about_handler.cc | 36 // This is called from chrome/browser/browser_about_handler.cc |
| 38 void ShowAboutIPCDialog(); | 37 void ShowAboutIPCDialog(); |
| 39 | 38 |
| 40 #endif // IPC_MESSAGE_LOG_ENABLED | 39 #endif // IPC_MESSAGE_LOG_ENABLED |
| 41 | 40 |
| 42 // Creates and shows an HTML dialog with the given delegate and context. | 41 // Creates and shows an HTML dialog with the given delegate and context. |
| 43 // The window is automatically destroyed when it is closed. | 42 // The window is automatically destroyed when it is closed. |
| 44 // Returns the created window. | 43 // Returns the created window. |
| 45 // | 44 // |
| 46 // Make sure to use the returned window only when you know it is safe | 45 // Make sure to use the returned window only when you know it is safe |
| 47 // to do so, i.e. before OnDialogClosed() is called on the delegate. | 46 // to do so, i.e. before OnDialogClosed() is called on the delegate. |
| (...skipping 15 matching lines...) Expand all Loading... |
| 63 // Shows or hide the hung renderer dialog for the given WebContents. | 62 // Shows or hide the hung renderer dialog for the given WebContents. |
| 64 // We need to pass the WebContents to the dialog, because multiple tabs can hang | 63 // We need to pass the WebContents to the dialog, because multiple tabs can hang |
| 65 // and it needs to keep track of which tabs are currently hung. | 64 // and it needs to keep track of which tabs are currently hung. |
| 66 void ShowHungRendererDialog(content::WebContents* contents); | 65 void ShowHungRendererDialog(content::WebContents* contents); |
| 67 void HideHungRendererDialog(content::WebContents* contents); | 66 void HideHungRendererDialog(content::WebContents* contents); |
| 68 | 67 |
| 69 // Shows a tab-modal dialog box. | 68 // Shows a tab-modal dialog box. |
| 70 void ShowTabModalConfirmDialog(TabModalConfirmDialogDelegate* delegate, | 69 void ShowTabModalConfirmDialog(TabModalConfirmDialogDelegate* delegate, |
| 71 TabContents* tab_contents); | 70 TabContents* tab_contents); |
| 72 | 71 |
| 73 } // namespace browser | 72 } // namespace chrome |
| 74 | 73 |
| 75 #endif // CHROME_BROWSER_UI_BROWSER_DIALOGS_H_ | 74 #endif // CHROME_BROWSER_UI_BROWSER_DIALOGS_H_ |
| OLD | NEW |