OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 IOS_WEB_PUBLIC_WEB_STATE_WEB_STATE_OBSERVER_H_ | 5 #ifndef IOS_WEB_PUBLIC_WEB_STATE_WEB_STATE_OBSERVER_H_ |
6 #define IOS_WEB_PUBLIC_WEB_STATE_WEB_STATE_OBSERVER_H_ | 6 #define IOS_WEB_PUBLIC_WEB_STATE_WEB_STATE_OBSERVER_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 #include <string> | 10 #include <string> |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 // |progress| is a value between 0.0 (nothing loaded) to 1.0 (page fully | 84 // |progress| is a value between 0.0 (nothing loaded) to 1.0 (page fully |
85 // loaded). | 85 // loaded). |
86 virtual void LoadProgressChanged(double progress) {} | 86 virtual void LoadProgressChanged(double progress) {} |
87 | 87 |
88 // Called when the title of the WebState is set. | 88 // Called when the title of the WebState is set. |
89 virtual void TitleWasSet() {} | 89 virtual void TitleWasSet() {} |
90 | 90 |
91 // Called when the visible security state of the page changes. | 91 // Called when the visible security state of the page changes. |
92 virtual void DidChangeVisibleSecurityState() {} | 92 virtual void DidChangeVisibleSecurityState() {} |
93 | 93 |
| 94 // Called when a dialog (JavaScript, geolocation) or window open request was |
| 95 // suppressed. |
| 96 // NOTE: Called only if WebState::SetShouldSuppressDialogs() was called with |
| 97 // false. |
| 98 virtual void DidSuppressDialog() {} |
| 99 |
94 // Called on form submission. |user_initiated| is true if the user | 100 // Called on form submission. |user_initiated| is true if the user |
95 // interacted with the page. | 101 // interacted with the page. |
96 virtual void DocumentSubmitted(const std::string& form_name, | 102 virtual void DocumentSubmitted(const std::string& form_name, |
97 bool user_initiated) {} | 103 bool user_initiated) {} |
98 | 104 |
99 // Called when the user is typing on a form field, with |error| indicating if | 105 // Called when the user is typing on a form field, with |error| indicating if |
100 // there is any error when parsing the form field information. | 106 // there is any error when parsing the form field information. |
101 virtual void FormActivityRegistered(const std::string& form_name, | 107 virtual void FormActivityRegistered(const std::string& form_name, |
102 const std::string& field_name, | 108 const std::string& field_name, |
103 const std::string& type, | 109 const std::string& type, |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
186 void ResetWebState(); | 192 void ResetWebState(); |
187 | 193 |
188 WebState* web_state_; | 194 WebState* web_state_; |
189 | 195 |
190 DISALLOW_COPY_AND_ASSIGN(WebStateObserver); | 196 DISALLOW_COPY_AND_ASSIGN(WebStateObserver); |
191 }; | 197 }; |
192 | 198 |
193 } // namespace web | 199 } // namespace web |
194 | 200 |
195 #endif // IOS_WEB_PUBLIC_WEB_STATE_WEB_STATE_OBSERVER_H_ | 201 #endif // IOS_WEB_PUBLIC_WEB_STATE_WEB_STATE_OBSERVER_H_ |
OLD | NEW |