| 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 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 156 // after the navigation commits. This method is for observers that want to | 156 // after the navigation commits. This method is for observers that want to |
| 157 // initialize renderer-side state just before the RenderFrame commits the | 157 // initialize renderer-side state just before the RenderFrame commits the |
| 158 // navigation. | 158 // navigation. |
| 159 // | 159 // |
| 160 // This is the first point in time where a RenderFrameHost is associated with | 160 // This is the first point in time where a RenderFrameHost is associated with |
| 161 // the navigation. | 161 // the navigation. |
| 162 virtual void ReadyToCommitNavigation(NavigationHandle* navigation_handle) {} | 162 virtual void ReadyToCommitNavigation(NavigationHandle* navigation_handle) {} |
| 163 | 163 |
| 164 // Called when a navigation finished in the WebContents. This happens when a | 164 // Called when a navigation finished in the WebContents. This happens when a |
| 165 // navigation is committed, aborted or replaced by a new one. To know if the | 165 // navigation is committed, aborted or replaced by a new one. To know if the |
| 166 // navigation has committed, use NavigationHandle::HasCommited; use | 166 // navigation has committed, use NavigationHandle::HasCommitted; use |
| 167 // NavigationHandle::IsErrorPage to know if the navigation resulted in an | 167 // NavigationHandle::IsErrorPage to know if the navigation resulted in an |
| 168 // error page. | 168 // error page. |
| 169 // | 169 // |
| 170 // If this is called because the navigation committed, then the document load | 170 // If this is called because the navigation committed, then the document load |
| 171 // will still be ongoing in the RenderFrameHost returned by | 171 // will still be ongoing in the RenderFrameHost returned by |
| 172 // |navigation_handle|. Use the document loads events such as DidStopLoading | 172 // |navigation_handle|. Use the document loads events such as DidStopLoading |
| 173 // and related methods to listen for continued events from this | 173 // and related methods to listen for continued events from this |
| 174 // RenderFrameHost. | 174 // RenderFrameHost. |
| 175 // | 175 // |
| 176 // Note that |navigation_handle| will be destroyed at the end of this call, | 176 // Note that |navigation_handle| will be destroyed at the end of this call, |
| (...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 487 void ResetWebContents(); | 487 void ResetWebContents(); |
| 488 | 488 |
| 489 WebContentsImpl* web_contents_; | 489 WebContentsImpl* web_contents_; |
| 490 | 490 |
| 491 DISALLOW_COPY_AND_ASSIGN(WebContentsObserver); | 491 DISALLOW_COPY_AND_ASSIGN(WebContentsObserver); |
| 492 }; | 492 }; |
| 493 | 493 |
| 494 } // namespace content | 494 } // namespace content |
| 495 | 495 |
| 496 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_OBSERVER_H_ | 496 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_OBSERVER_H_ |
| OLD | NEW |