| 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 "base/process/kill.h" | 8 #include "base/process/kill.h" |
| 9 #include "base/process/process_handle.h" | 9 #include "base/process/process_handle.h" |
| 10 #include "content/common/content_export.h" | 10 #include "content/common/content_export.h" |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 // validated URL was either an error page or an iframe srcdoc. | 122 // validated URL was either an error page or an iframe srcdoc. |
| 123 // | 123 // |
| 124 // Note that during a cross-process navigation, several provisional loads | 124 // Note that during a cross-process navigation, several provisional loads |
| 125 // can be on-going in parallel. | 125 // can be on-going in parallel. |
| 126 virtual void DidStartProvisionalLoadForFrame( | 126 virtual void DidStartProvisionalLoadForFrame( |
| 127 RenderFrameHost* render_frame_host, | 127 RenderFrameHost* render_frame_host, |
| 128 const GURL& validated_url, | 128 const GURL& validated_url, |
| 129 bool is_error_page, | 129 bool is_error_page, |
| 130 bool is_iframe_srcdoc) {} | 130 bool is_iframe_srcdoc) {} |
| 131 | 131 |
| 132 // This method is invoked right after the DidStartProvisionalLoadForFrame if | |
| 133 // the provisional load affects the main frame, or if the provisional load | |
| 134 // was redirected. | |
| 135 // | |
| 136 // The latter use case is DEPRECATED. You should listen to | |
| 137 // WebContentsObserver::DidGetRedirectForResourceRequest instead. | |
| 138 // | |
| 139 // The former use case is redundant; you should use | |
| 140 // DidStartProvisionalLoadForFrame instead, and do a check for the main frame. | |
| 141 // | |
| 142 // As a result, this whole callback is silly and DEPRECATED. Do not use it. | |
| 143 // http://crbug.com/78512 | |
| 144 virtual void ProvisionalChangeToMainFrameUrl( | |
| 145 const GURL& url, | |
| 146 RenderFrameHost* render_frame_host) {} | |
| 147 | |
| 148 // This method is invoked when the provisional load was successfully | 132 // This method is invoked when the provisional load was successfully |
| 149 // committed. | 133 // committed. |
| 150 // | 134 // |
| 151 // If the navigation only changed the reference fragment, or was triggered | 135 // If the navigation only changed the reference fragment, or was triggered |
| 152 // using the history API (e.g. window.history.replaceState), we will receive | 136 // using the history API (e.g. window.history.replaceState), we will receive |
| 153 // this signal without a prior DidStartProvisionalLoadForFrame signal. | 137 // this signal without a prior DidStartProvisionalLoadForFrame signal. |
| 154 virtual void DidCommitProvisionalLoadForFrame( | 138 virtual void DidCommitProvisionalLoadForFrame( |
| 155 RenderFrameHost* render_frame_host, | 139 RenderFrameHost* render_frame_host, |
| 156 const GURL& url, | 140 const GURL& url, |
| 157 ui::PageTransition transition_type) {} | 141 ui::PageTransition transition_type) {} |
| (...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 367 void ResetWebContents(); | 351 void ResetWebContents(); |
| 368 | 352 |
| 369 WebContentsImpl* web_contents_; | 353 WebContentsImpl* web_contents_; |
| 370 | 354 |
| 371 DISALLOW_COPY_AND_ASSIGN(WebContentsObserver); | 355 DISALLOW_COPY_AND_ASSIGN(WebContentsObserver); |
| 372 }; | 356 }; |
| 373 | 357 |
| 374 } // namespace content | 358 } // namespace content |
| 375 | 359 |
| 376 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_OBSERVER_H_ | 360 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_OBSERVER_H_ |
| OLD | NEW |