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 UI_VIEWS_CONTROLS_WEBVIEW_WEB_DIALOG_VIEW_H_ | 5 #ifndef UI_VIEWS_CONTROLS_WEBVIEW_WEB_DIALOG_VIEW_H_ |
6 #define UI_VIEWS_CONTROLS_WEBVIEW_WEB_DIALOG_VIEW_H_ | 6 #define UI_VIEWS_CONTROLS_WEBVIEW_WEB_DIALOG_VIEW_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 virtual GURL GetDialogContentURL() const OVERRIDE; | 79 virtual GURL GetDialogContentURL() const OVERRIDE; |
80 virtual void GetWebUIMessageHandlers( | 80 virtual void GetWebUIMessageHandlers( |
81 std::vector<content::WebUIMessageHandler*>* handlers) const OVERRIDE; | 81 std::vector<content::WebUIMessageHandler*>* handlers) const OVERRIDE; |
82 virtual void GetDialogSize(gfx::Size* size) const OVERRIDE; | 82 virtual void GetDialogSize(gfx::Size* size) const OVERRIDE; |
83 virtual void GetMinimumDialogSize(gfx::Size* size) const OVERRIDE; | 83 virtual void GetMinimumDialogSize(gfx::Size* size) const OVERRIDE; |
84 virtual std::string GetDialogArgs() const OVERRIDE; | 84 virtual std::string GetDialogArgs() const OVERRIDE; |
85 virtual void OnDialogShown( | 85 virtual void OnDialogShown( |
86 content::WebUI* webui, | 86 content::WebUI* webui, |
87 content::RenderViewHost* render_view_host) OVERRIDE; | 87 content::RenderViewHost* render_view_host) OVERRIDE; |
88 virtual void OnDialogClosed(const std::string& json_retval) OVERRIDE; | 88 virtual void OnDialogClosed(const std::string& json_retval) OVERRIDE; |
| 89 virtual void OnDialogCloseFromWebUI( |
| 90 const std::string& json_retval) OVERRIDE; |
89 virtual void OnCloseContents(content::WebContents* source, | 91 virtual void OnCloseContents(content::WebContents* source, |
90 bool* out_close_dialog) OVERRIDE; | 92 bool* out_close_dialog) OVERRIDE; |
91 virtual bool ShouldShowDialogTitle() const OVERRIDE; | 93 virtual bool ShouldShowDialogTitle() const OVERRIDE; |
92 virtual bool HandleContextMenu( | 94 virtual bool HandleContextMenu( |
93 const content::ContextMenuParams& params) OVERRIDE; | 95 const content::ContextMenuParams& params) OVERRIDE; |
94 | 96 |
95 // Overridden from content::WebContentsDelegate: | 97 // Overridden from content::WebContentsDelegate: |
96 virtual void MoveContents(content::WebContents* source, | 98 virtual void MoveContents(content::WebContents* source, |
97 const gfx::Rect& pos) OVERRIDE; | 99 const gfx::Rect& pos) OVERRIDE; |
98 virtual void HandleKeyboardEvent( | 100 virtual void HandleKeyboardEvent( |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
133 views::WebView* web_view_; | 135 views::WebView* web_view_; |
134 | 136 |
135 // Whether user is attempting to close the dialog and we are processing | 137 // Whether user is attempting to close the dialog and we are processing |
136 // beforeunload event. | 138 // beforeunload event. |
137 bool is_attempting_close_dialog_; | 139 bool is_attempting_close_dialog_; |
138 | 140 |
139 // Whether beforeunload event has been fired and we have finished processing | 141 // Whether beforeunload event has been fired and we have finished processing |
140 // beforeunload event. | 142 // beforeunload event. |
141 bool before_unload_fired_; | 143 bool before_unload_fired_; |
142 | 144 |
| 145 // Whether the dialog is closed from WebUI in response to a "DialogClose" |
| 146 // message. |
| 147 bool closed_via_webui_; |
| 148 |
| 149 // A json string returned to WebUI from a "DialogClosed" message. |
| 150 std::string dialog_close_retval_; |
| 151 |
143 DISALLOW_COPY_AND_ASSIGN(WebDialogView); | 152 DISALLOW_COPY_AND_ASSIGN(WebDialogView); |
144 }; | 153 }; |
145 | 154 |
146 } // namespace views | 155 } // namespace views |
147 | 156 |
148 #endif // UI_VIEWS_CONTROLS_WEBVIEW_WEB_DIALOG_VIEW_H_ | 157 #endif // UI_VIEWS_CONTROLS_WEBVIEW_WEB_DIALOG_VIEW_H_ |
OLD | NEW |