| 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 20 matching lines...) Expand all Loading... |
| 31 public: | 31 public: |
| 32 // Returns the web state associated with this observer. | 32 // Returns the web state associated with this observer. |
| 33 WebState* web_state() const { return web_state_; } | 33 WebState* web_state() const { return web_state_; } |
| 34 | 34 |
| 35 // This method is invoked when a load request is registered. | 35 // This method is invoked when a load request is registered. |
| 36 virtual void ProvisionalNavigationStarted(const GURL& url) {} | 36 virtual void ProvisionalNavigationStarted(const GURL& url) {} |
| 37 | 37 |
| 38 // This method is invoked when committed navigation items have been pruned. | 38 // This method is invoked when committed navigation items have been pruned. |
| 39 virtual void NavigationItemsPruned(size_t pruned_item_count) {} | 39 virtual void NavigationItemsPruned(size_t pruned_item_count) {} |
| 40 | 40 |
| 41 // This method is invoked when a navigation item has changed. | 41 // This method is invoked either when NavigationItem's titile did change or |
| 42 // when window.location.replace JavaScript API was called. |
| 43 // DEPRECATED. Use |TitleWasSet| to listen for title changes and |
| 44 // |DidFinishNavigation| for |window.location.replace|. |
| 45 // TODO(crbug.com/720786): Remove this method. |
| 42 virtual void NavigationItemChanged() {} | 46 virtual void NavigationItemChanged() {} |
| 43 | 47 |
| 44 // This method is invoked when a new non-pending navigation item is created. | 48 // This method is invoked when a new non-pending navigation item is created. |
| 45 // This corresponds to one NavigationManager item being created | 49 // This corresponds to one NavigationManager item being created |
| 46 // (in the case of new navigations) or renavigated to (for back/forward | 50 // (in the case of new navigations) or renavigated to (for back/forward |
| 47 // navigations). | 51 // navigations). |
| 48 virtual void NavigationItemCommitted( | 52 virtual void NavigationItemCommitted( |
| 49 const LoadCommittedDetails& load_details) {} | 53 const LoadCommittedDetails& load_details) {} |
| 50 | 54 |
| 51 // Called when a navigation finished in the WebState. This happens when a | 55 // Called when a navigation finished in the WebState. This happens when a |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 142 void ResetWebState(); | 146 void ResetWebState(); |
| 143 | 147 |
| 144 WebState* web_state_; | 148 WebState* web_state_; |
| 145 | 149 |
| 146 DISALLOW_COPY_AND_ASSIGN(WebStateObserver); | 150 DISALLOW_COPY_AND_ASSIGN(WebStateObserver); |
| 147 }; | 151 }; |
| 148 | 152 |
| 149 } // namespace web | 153 } // namespace web |
| 150 | 154 |
| 151 #endif // IOS_WEB_PUBLIC_WEB_STATE_WEB_STATE_OBSERVER_H_ | 155 #endif // IOS_WEB_PUBLIC_WEB_STATE_WEB_STATE_OBSERVER_H_ |
| OLD | NEW |