| 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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 virtual void PageLoaded(PageLoadCompletionStatus load_completion_status) {} | 78 virtual void PageLoaded(PageLoadCompletionStatus load_completion_status) {} |
| 79 | 79 |
| 80 // Called when the interstitial is dismissed by the user. | 80 // Called when the interstitial is dismissed by the user. |
| 81 virtual void InterstitialDismissed() {} | 81 virtual void InterstitialDismissed() {} |
| 82 | 82 |
| 83 // Notifies the observer that the page has made some progress loading. | 83 // Notifies the observer that the page has made some progress 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. |
| 89 virtual void TitleWasSet() {} |
| 90 |
| 88 // Called on form submission. |user_initiated| is true if the user | 91 // Called on form submission. |user_initiated| is true if the user |
| 89 // interacted with the page. | 92 // interacted with the page. |
| 90 virtual void DocumentSubmitted(const std::string& form_name, | 93 virtual void DocumentSubmitted(const std::string& form_name, |
| 91 bool user_initiated) {} | 94 bool user_initiated) {} |
| 92 | 95 |
| 93 // Called when the user is typing on a form field, with |error| indicating if | 96 // Called when the user is typing on a form field, with |error| indicating if |
| 94 // there is any error when parsing the form field information. | 97 // there is any error when parsing the form field information. |
| 95 virtual void FormActivityRegistered(const std::string& form_name, | 98 virtual void FormActivityRegistered(const std::string& form_name, |
| 96 const std::string& field_name, | 99 const std::string& field_name, |
| 97 const std::string& type, | 100 const std::string& type, |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 180 void ResetWebState(); | 183 void ResetWebState(); |
| 181 | 184 |
| 182 WebState* web_state_; | 185 WebState* web_state_; |
| 183 | 186 |
| 184 DISALLOW_COPY_AND_ASSIGN(WebStateObserver); | 187 DISALLOW_COPY_AND_ASSIGN(WebStateObserver); |
| 185 }; | 188 }; |
| 186 | 189 |
| 187 } // namespace web | 190 } // namespace web |
| 188 | 191 |
| 189 #endif // IOS_WEB_PUBLIC_WEB_STATE_WEB_STATE_OBSERVER_H_ | 192 #endif // IOS_WEB_PUBLIC_WEB_STATE_WEB_STATE_OBSERVER_H_ |
| OLD | NEW |