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 "components/web_modal/native_web_contents_modal_dialog.h" | 9 #include "components/web_modal/native_web_contents_modal_dialog.h" |
10 #include "content/public/browser/web_ui_controller.h" | 10 #include "content/public/browser/web_ui_controller.h" |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 // | 51 // |
52 // Since the web contents modal dialog requires platform-specific delegate | 52 // Since the web contents modal dialog requires platform-specific delegate |
53 // implementations, this class is just a factory stub. | 53 // implementations, this class is just a factory stub. |
54 class ConstrainedWebDialogUI : public content::WebUIController { | 54 class ConstrainedWebDialogUI : public content::WebUIController { |
55 public: | 55 public: |
56 explicit ConstrainedWebDialogUI(content::WebUI* web_ui); | 56 explicit ConstrainedWebDialogUI(content::WebUI* web_ui); |
57 virtual ~ConstrainedWebDialogUI(); | 57 virtual ~ConstrainedWebDialogUI(); |
58 | 58 |
59 // WebUIController implementation: | 59 // WebUIController implementation: |
60 virtual void RenderViewCreated( | 60 virtual void RenderViewCreated( |
61 content::RenderViewHost* render_view_host) OVERRIDE; | 61 content::RenderViewHost* render_view_host) override; |
62 | 62 |
63 // Sets the delegate on the WebContents. | 63 // Sets the delegate on the WebContents. |
64 static void SetConstrainedDelegate(content::WebContents* web_contents, | 64 static void SetConstrainedDelegate(content::WebContents* web_contents, |
65 ConstrainedWebDialogDelegate* delegate); | 65 ConstrainedWebDialogDelegate* delegate); |
66 | 66 |
67 protected: | 67 protected: |
68 // Returns the ConstrainedWebDialogDelegate saved with the WebContents. | 68 // Returns the ConstrainedWebDialogDelegate saved with the WebContents. |
69 // Returns NULL if no such delegate is set. | 69 // Returns NULL if no such delegate is set. |
70 ConstrainedWebDialogDelegate* GetConstrainedDelegate(); | 70 ConstrainedWebDialogDelegate* GetConstrainedDelegate(); |
71 | 71 |
(...skipping 10 matching lines...) Expand all Loading... |
82 // |browser_context| is used to construct the constrained HTML dialog's | 82 // |browser_context| is used to construct the constrained HTML dialog's |
83 // WebContents. | 83 // WebContents. |
84 // |delegate| controls the behavior of the dialog. | 84 // |delegate| controls the behavior of the dialog. |
85 // |overshadowed| is the tab being overshadowed by the dialog. | 85 // |overshadowed| is the tab being overshadowed by the dialog. |
86 ConstrainedWebDialogDelegate* CreateConstrainedWebDialog( | 86 ConstrainedWebDialogDelegate* CreateConstrainedWebDialog( |
87 content::BrowserContext* browser_context, | 87 content::BrowserContext* browser_context, |
88 ui::WebDialogDelegate* delegate, | 88 ui::WebDialogDelegate* delegate, |
89 content::WebContents* overshadowed); | 89 content::WebContents* overshadowed); |
90 | 90 |
91 #endif // CHROME_BROWSER_UI_WEBUI_CONSTRAINED_WEB_DIALOG_UI_H_ | 91 #endif // CHROME_BROWSER_UI_WEBUI_CONSTRAINED_WEB_DIALOG_UI_H_ |
OLD | NEW |