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 <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 // This view is a delegate to the HTML content since it needs to get notified | 136 // This view is a delegate to the HTML content since it needs to get notified |
137 // about when the dialog is closing. For all other actions (besides dialog | 137 // about when the dialog is closing. For all other actions (besides dialog |
138 // closing) we delegate to the creator of this view, which we keep track of | 138 // closing) we delegate to the creator of this view, which we keep track of |
139 // using this variable. | 139 // using this variable. |
140 ui::WebDialogDelegate* delegate_; | 140 ui::WebDialogDelegate* delegate_; |
141 | 141 |
142 views::WebView* web_view_; | 142 views::WebView* web_view_; |
143 | 143 |
144 // Whether user is attempting to close the dialog and we are processing | 144 // Whether user is attempting to close the dialog and we are processing |
145 // beforeunload event. | 145 // beforeunload event. |
146 bool is_attempting_close_dialog_; | 146 bool is_attempting_close_dialog_ = false; |
147 | 147 |
148 // Whether beforeunload event has been fired and we have finished processing | 148 // Whether beforeunload event has been fired and we have finished processing |
149 // beforeunload event. | 149 // beforeunload event. |
150 bool before_unload_fired_; | 150 bool before_unload_fired_ = false; |
151 | 151 |
152 // Whether the dialog is closed from WebUI in response to a "dialogClose" | 152 // Whether the dialog is closed from WebUI in response to a "dialogClose" |
153 // message. | 153 // message. |
154 bool closed_via_webui_; | 154 bool closed_via_webui_ = false; |
155 | 155 |
156 // A json string returned to WebUI from a "dialogClose" message. | 156 // A json string returned to WebUI from a "dialogClose" message. |
157 std::string dialog_close_retval_; | 157 std::string dialog_close_retval_; |
158 | 158 |
159 // Whether CloseContents() has been called. | 159 // Whether CloseContents() has been called. |
160 bool close_contents_called_; | 160 bool close_contents_called_ = false; |
161 | 161 |
162 DISALLOW_COPY_AND_ASSIGN(WebDialogView); | 162 DISALLOW_COPY_AND_ASSIGN(WebDialogView); |
163 }; | 163 }; |
164 | 164 |
165 } // namespace views | 165 } // namespace views |
166 | 166 |
167 #endif // UI_VIEWS_CONTROLS_WEBVIEW_WEB_DIALOG_VIEW_H_ | 167 #endif // UI_VIEWS_CONTROLS_WEBVIEW_WEB_DIALOG_VIEW_H_ |
OLD | NEW |