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 "base/macros.h" | 8 #include "base/macros.h" |
9 | 9 |
10 namespace web { | 10 namespace web { |
(...skipping 10 matching lines...) Expand all Loading... | |
21 WebState* web_state() const { return web_state_; } | 21 WebState* web_state() const { return web_state_; } |
22 | 22 |
23 // This method is invoked when a new non-pending navigation item is created. | 23 // This method is invoked when a new non-pending navigation item is created. |
24 // This corresponds to one NavigationManager item being created | 24 // This corresponds to one NavigationManager item being created |
25 // (in the case of new navigations) or renavigated to (for back/forward | 25 // (in the case of new navigations) or renavigated to (for back/forward |
26 // navigations). | 26 // navigations). |
27 virtual void NavigationItemCommitted( | 27 virtual void NavigationItemCommitted( |
28 const LoadCommittedDetails& load_details) {} | 28 const LoadCommittedDetails& load_details) {} |
29 | 29 |
30 // Called when the current page is loaded. | 30 // Called when the current page is loaded. |
31 virtual void PageLoaded() {} | 31 virtual void PageLoaded(bool load_success) {} |
stuartmorgan
2015/01/06 19:29:27
Since PageLoaded(false) isn't quite obvious (it so
| |
32 | 32 |
33 // Called on URL hash change events. | 33 // Called on URL hash change events. |
34 virtual void URLHashChanged() {} | 34 virtual void URLHashChanged() {} |
35 | 35 |
36 // Called on history state change events. | 36 // Called on history state change events. |
37 virtual void HistoryStateChanged() {} | 37 virtual void HistoryStateChanged() {} |
38 | 38 |
39 // Invoked when the WebState is being destroyed. Gives subclasses a chance | 39 // Invoked when the WebState is being destroyed. Gives subclasses a chance |
40 // to cleanup. | 40 // to cleanup. |
41 virtual void WebStateDestroyed() {} | 41 virtual void WebStateDestroyed() {} |
(...skipping 20 matching lines...) Expand all Loading... | |
62 void ResetWebState(); | 62 void ResetWebState(); |
63 | 63 |
64 WebState* web_state_; | 64 WebState* web_state_; |
65 | 65 |
66 DISALLOW_COPY_AND_ASSIGN(WebStateObserver); | 66 DISALLOW_COPY_AND_ASSIGN(WebStateObserver); |
67 }; | 67 }; |
68 | 68 |
69 } // namespace web | 69 } // namespace web |
70 | 70 |
71 #endif // IOS_WEB_PUBLIC_WEB_STATE_WEB_STATE_OBSERVER_H_ | 71 #endif // IOS_WEB_PUBLIC_WEB_STATE_WEB_STATE_OBSERVER_H_ |
OLD | NEW |