| 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_WEBUI_CONSTRAINED_WEB_DIALOG_UI_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_CONSTRAINED_WEB_DIALOG_UI_H_ |
| 6 #define CHROME_BROWSER_UI_WEBUI_CONSTRAINED_WEB_DIALOG_UI_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_CONSTRAINED_WEB_DIALOG_UI_H_ |
| 7 | 7 |
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "content/public/browser/web_ui_controller.h" | 10 #include "content/public/browser/web_ui_controller.h" |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 | 84 |
| 85 private: | 85 private: |
| 86 // JS Message Handler | 86 // JS Message Handler |
| 87 void OnDialogCloseMessage(const base::ListValue* args); | 87 void OnDialogCloseMessage(const base::ListValue* args); |
| 88 | 88 |
| 89 DISALLOW_COPY_AND_ASSIGN(ConstrainedWebDialogUI); | 89 DISALLOW_COPY_AND_ASSIGN(ConstrainedWebDialogUI); |
| 90 }; | 90 }; |
| 91 | 91 |
| 92 // Create and show a constrained HTML dialog. The actual object that gets | 92 // Create and show a constrained HTML dialog. The actual object that gets |
| 93 // created is a ConstrainedWebDialogDelegate, which later triggers construction | 93 // created is a ConstrainedWebDialogDelegate, which later triggers construction |
| 94 // of a ConstrainedWebDialogUI object. | 94 // of a ConstrainedWebDialogUI object. The returned object deletes itself when |
| 95 // the dialog closes. |
| 95 // |browser_context| is used to construct the constrained HTML dialog's | 96 // |browser_context| is used to construct the constrained HTML dialog's |
| 96 // WebContents. | 97 // WebContents. |
| 97 // |delegate| controls the behavior of the dialog. | 98 // |delegate| controls the behavior of the dialog. |
| 98 // |overshadowed| is the tab being overshadowed by the dialog. | 99 // |overshadowed| is the tab being overshadowed by the dialog. |
| 99 ConstrainedWebDialogDelegate* ShowConstrainedWebDialog( | 100 ConstrainedWebDialogDelegate* ShowConstrainedWebDialog( |
| 100 content::BrowserContext* browser_context, | 101 content::BrowserContext* browser_context, |
| 101 ui::WebDialogDelegate* delegate, | 102 ui::WebDialogDelegate* delegate, |
| 102 content::WebContents* overshadowed); | 103 content::WebContents* overshadowed); |
| 103 | 104 |
| 105 // Create and show a constrained HTML dialog that, for ChromeOS, is not bound |
| 106 // to the limits of the parent window. For all other operating systems, which |
| 107 // do not support child windows that are not clipped to the parent window, |
| 108 // the function has the same behavior as ShowConstrainedWebDialog. The actual |
| 109 // object that gets created is a ConstrainedWebDialogDelegate, which later |
| 110 // triggers construction of a ConstrainedWebDialogUI object. The returned |
| 111 // object deletes itself when the dialog closes. |
| 112 // |browser_context| is used to construct the constrained HTML dialog's |
| 113 // WebContents. |
| 114 // |delegate| controls the behavior of the dialog. |
| 115 // |overshadowed| is the tab being overshadowed by the dialog. |
| 116 ConstrainedWebDialogDelegate* ShowTopLevelConstrainedWebDialog( |
| 117 content::BrowserContext* browser_context, |
| 118 ui::WebDialogDelegate* delegate, |
| 119 content::WebContents* web_contents); |
| 120 |
| 104 // Create and show a constrained HTML dialog with auto-resize enabled. The | 121 // Create and show a constrained HTML dialog with auto-resize enabled. The |
| 105 // dialog is shown automatically after document load has completed to avoid UI | 122 // dialog is shown automatically after document load has completed to avoid UI |
| 106 // jankiness. | 123 // jankiness. The returned object deletes itself when the dialog closes. |
| 107 // |browser_context| is used to construct the dialog's WebContents. | 124 // |browser_context| is used to construct the dialog's WebContents. |
| 108 // |delegate| controls the behavior of the dialog. | 125 // |delegate| controls the behavior of the dialog. |
| 109 // |overshadowed| is the tab being overshadowed by the dialog. | 126 // |overshadowed| is the tab being overshadowed by the dialog. |
| 110 // |min_size| is the minimum size of the dialog. | 127 // |min_size| is the minimum size of the dialog. |
| 111 // |max_size| is the maximum size of the dialog. | 128 // |max_size| is the maximum size of the dialog. |
| 112 ConstrainedWebDialogDelegate* ShowConstrainedWebDialogWithAutoResize( | 129 ConstrainedWebDialogDelegate* ShowConstrainedWebDialogWithAutoResize( |
| 113 content::BrowserContext* browser_context, | 130 content::BrowserContext* browser_context, |
| 114 ui::WebDialogDelegate* delegate, | 131 ui::WebDialogDelegate* delegate, |
| 115 content::WebContents* overshadowed, | 132 content::WebContents* overshadowed, |
| 116 const gfx::Size& min_size, | 133 const gfx::Size& min_size, |
| 117 const gfx::Size& max_size); | 134 const gfx::Size& max_size); |
| 118 | 135 |
| 119 #endif // CHROME_BROWSER_UI_WEBUI_CONSTRAINED_WEB_DIALOG_UI_H_ | 136 #endif // CHROME_BROWSER_UI_WEBUI_CONSTRAINED_WEB_DIALOG_UI_H_ |
| OLD | NEW |