| 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 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 193 // SOON TO BE DEPRECATED. Use DidStartNavigation instead in PlzNavigate. In | 193 // SOON TO BE DEPRECATED. Use DidStartNavigation instead in PlzNavigate. In |
| 194 // default mode, it is still necessary to override this function to be | 194 // default mode, it is still necessary to override this function to be |
| 195 // notified about a navigation earlier than DidStartProvisionalLoad. This | 195 // notified about a navigation earlier than DidStartProvisionalLoad. This |
| 196 // function will be removed when PlzNavigate is enabled. | 196 // function will be removed when PlzNavigate is enabled. |
| 197 virtual void DidStartNavigationToPendingEntry(const GURL& url, | 197 virtual void DidStartNavigationToPendingEntry(const GURL& url, |
| 198 ReloadType reload_type) {} | 198 ReloadType reload_type) {} |
| 199 | 199 |
| 200 // |render_frame_host| is the RenderFrameHost for which the provisional load | 200 // |render_frame_host| is the RenderFrameHost for which the provisional load |
| 201 // is happening. | 201 // is happening. |
| 202 // | 202 // |
| 203 // Since the URL validation will strip error URLs, or srcdoc URLs, the boolean | 203 // Since the URL validation will strip error URLs, the boolean flag |
| 204 // flags |is_error_page| and |is_iframe_srcdoc| will indicate that the not | 204 // |is_error_page| will indicate that the not validated URL was an error page. |
| 205 // validated URL was either an error page or an iframe srcdoc. | |
| 206 // | 205 // |
| 207 // Note that during a cross-process navigation, several provisional loads | 206 // Note that during a cross-process navigation, several provisional loads |
| 208 // can be on-going in parallel. | 207 // can be on-going in parallel. |
| 209 // | 208 // |
| 210 // DEPRECATED. Use DidStartNavigation instead in all cases. | 209 // DEPRECATED. Use DidStartNavigation instead in all cases. |
| 211 virtual void DidStartProvisionalLoadForFrame( | 210 virtual void DidStartProvisionalLoadForFrame( |
| 212 RenderFrameHost* render_frame_host, | 211 RenderFrameHost* render_frame_host, |
| 213 const GURL& validated_url, | 212 const GURL& validated_url, |
| 214 bool is_error_page, | 213 bool is_error_page) {} |
| 215 bool is_iframe_srcdoc) {} | |
| 216 | 214 |
| 217 // This method is invoked when the provisional load was successfully | 215 // This method is invoked when the provisional load was successfully |
| 218 // committed. | 216 // committed. |
| 219 // | 217 // |
| 220 // If the navigation only changed the reference fragment, or was triggered | 218 // If the navigation only changed the reference fragment, or was triggered |
| 221 // using the history API (e.g. window.history.replaceState), we will receive | 219 // using the history API (e.g. window.history.replaceState), we will receive |
| 222 // this signal without a prior DidStartProvisionalLoadForFrame signal. | 220 // this signal without a prior DidStartProvisionalLoadForFrame signal. |
| 223 // | 221 // |
| 224 // DEPRECATED. Use DidFinishNavigation instead in all cases. | 222 // DEPRECATED. Use DidFinishNavigation instead in all cases. |
| 225 virtual void DidCommitProvisionalLoadForFrame( | 223 virtual void DidCommitProvisionalLoadForFrame( |
| (...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 513 void ResetWebContents(); | 511 void ResetWebContents(); |
| 514 | 512 |
| 515 WebContentsImpl* web_contents_; | 513 WebContentsImpl* web_contents_; |
| 516 | 514 |
| 517 DISALLOW_COPY_AND_ASSIGN(WebContentsObserver); | 515 DISALLOW_COPY_AND_ASSIGN(WebContentsObserver); |
| 518 }; | 516 }; |
| 519 | 517 |
| 520 } // namespace content | 518 } // namespace content |
| 521 | 519 |
| 522 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_OBSERVER_H_ | 520 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_OBSERVER_H_ |
| OLD | NEW |