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 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 | 132 // This method is invoked right after the DidStartProvisionalLoadForFrame if |
133 // the provisional load affects the main frame, or if the provisional load | 133 // the provisional load affects the main frame, or if the provisional load |
134 // was redirected. The latter use case is DEPRECATED. You should listen to | 134 // was redirected. |
| 135 // |
| 136 // The latter use case is DEPRECATED. You should listen to |
135 // WebContentsObserver::DidGetRedirectForResourceRequest instead. | 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 |
136 virtual void ProvisionalChangeToMainFrameUrl( | 144 virtual void ProvisionalChangeToMainFrameUrl( |
137 const GURL& url, | 145 const GURL& url, |
138 RenderFrameHost* render_frame_host) {} | 146 RenderFrameHost* render_frame_host) {} |
139 | 147 |
140 // This method is invoked when the provisional load was successfully | 148 // This method is invoked when the provisional load was successfully |
141 // committed. | 149 // committed. |
142 // | 150 // |
143 // If the navigation only changed the reference fragment, or was triggered | 151 // If the navigation only changed the reference fragment, or was triggered |
144 // using the history API (e.g. window.history.replaceState), we will receive | 152 // using the history API (e.g. window.history.replaceState), we will receive |
145 // this signal without a prior DidStartProvisionalLoadForFrame signal. | 153 // this signal without a prior DidStartProvisionalLoadForFrame signal. |
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
359 void ResetWebContents(); | 367 void ResetWebContents(); |
360 | 368 |
361 WebContentsImpl* web_contents_; | 369 WebContentsImpl* web_contents_; |
362 | 370 |
363 DISALLOW_COPY_AND_ASSIGN(WebContentsObserver); | 371 DISALLOW_COPY_AND_ASSIGN(WebContentsObserver); |
364 }; | 372 }; |
365 | 373 |
366 } // namespace content | 374 } // namespace content |
367 | 375 |
368 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_OBSERVER_H_ | 376 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_OBSERVER_H_ |
OLD | NEW |