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 CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_OBSERVER_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_OBSERVER_H_ |
6 #define CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_OBSERVER_H_ | 6 #define CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_OBSERVER_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
147 // NavigationHandle. | 147 // NavigationHandle. |
148 // | 148 // |
149 // Note that there is no guarantee that DidFinishNavigation will be called | 149 // Note that there is no guarantee that DidFinishNavigation will be called |
150 // for any particular navigation before DidStartNavigation is called on the | 150 // for any particular navigation before DidStartNavigation is called on the |
151 // next. | 151 // next. |
152 virtual void DidStartNavigation(NavigationHandle* navigation_handle) {} | 152 virtual void DidStartNavigation(NavigationHandle* navigation_handle) {} |
153 | 153 |
154 // Called when a navigation encountered a server redirect. | 154 // Called when a navigation encountered a server redirect. |
155 virtual void DidRedirectNavigation(NavigationHandle* navigation_handle) {} | 155 virtual void DidRedirectNavigation(NavigationHandle* navigation_handle) {} |
156 | 156 |
157 // PlzNavigate | |
158 // Called when the navigation is ready to be committed in a renderer. Most | 157 // Called when the navigation is ready to be committed in a renderer. Most |
159 // observers should use DidFinishNavigation instead, which happens right | 158 // observers should use DidFinishNavigation instead, which happens right |
160 // after the navigation commits. This method is for observers that want to | 159 // after the navigation commits. This method is for observers that want to |
161 // initialize renderer-side state just before the RenderFrame commits the | 160 // initialize renderer-side state just before the RenderFrame commits the |
162 // navigation. | 161 // navigation. |
163 // | 162 // |
| 163 // PlzNavigate |
164 // This is the first point in time where a RenderFrameHost is associated with | 164 // This is the first point in time where a RenderFrameHost is associated with |
165 // the navigation. | 165 // the navigation. |
166 virtual void ReadyToCommitNavigation(NavigationHandle* navigation_handle) {} | 166 virtual void ReadyToCommitNavigation(NavigationHandle* navigation_handle) {} |
167 | 167 |
168 // Called when a navigation finished in the WebContents. This happens when a | 168 // Called when a navigation finished in the WebContents. This happens when a |
169 // navigation is committed, aborted or replaced by a new one. To know if the | 169 // navigation is committed, aborted or replaced by a new one. To know if the |
170 // navigation has committed, use NavigationHandle::HasCommitted; use | 170 // navigation has committed, use NavigationHandle::HasCommitted; use |
171 // NavigationHandle::IsErrorPage to know if the navigation resulted in an | 171 // NavigationHandle::IsErrorPage to know if the navigation resulted in an |
172 // error page. | 172 // error page. |
173 // | 173 // |
(...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
513 void ResetWebContents(); | 513 void ResetWebContents(); |
514 | 514 |
515 WebContentsImpl* web_contents_; | 515 WebContentsImpl* web_contents_; |
516 | 516 |
517 DISALLOW_COPY_AND_ASSIGN(WebContentsObserver); | 517 DISALLOW_COPY_AND_ASSIGN(WebContentsObserver); |
518 }; | 518 }; |
519 | 519 |
520 } // namespace content | 520 } // namespace content |
521 | 521 |
522 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_OBSERVER_H_ | 522 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_OBSERVER_H_ |
OLD | NEW |