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 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
154 virtual void DidCommitProvisionalLoadForFrame( | 154 virtual void DidCommitProvisionalLoadForFrame( |
155 RenderFrameHost* render_frame_host, | 155 RenderFrameHost* render_frame_host, |
156 const GURL& url, | 156 const GURL& url, |
157 ui::PageTransition transition_type) {} | 157 ui::PageTransition transition_type) {} |
158 | 158 |
159 // This method is invoked when the provisional load failed. | 159 // This method is invoked when the provisional load failed. |
160 virtual void DidFailProvisionalLoad( | 160 virtual void DidFailProvisionalLoad( |
161 RenderFrameHost* render_frame_host, | 161 RenderFrameHost* render_frame_host, |
162 const GURL& validated_url, | 162 const GURL& validated_url, |
163 int error_code, | 163 int error_code, |
164 const base::string16& error_description) {} | 164 const base::string16& error_description, |
| 165 bool was_ignored_by_handler) {} |
165 | 166 |
166 // If the provisional load corresponded to the main frame, this method is | 167 // If the provisional load corresponded to the main frame, this method is |
167 // invoked in addition to DidCommitProvisionalLoadForFrame. | 168 // invoked in addition to DidCommitProvisionalLoadForFrame. |
168 virtual void DidNavigateMainFrame( | 169 virtual void DidNavigateMainFrame( |
169 const LoadCommittedDetails& details, | 170 const LoadCommittedDetails& details, |
170 const FrameNavigateParams& params) {} | 171 const FrameNavigateParams& params) {} |
171 | 172 |
172 // And regardless of what frame navigated, this method is invoked after | 173 // And regardless of what frame navigated, this method is invoked after |
173 // DidCommitProvisionalLoadForFrame was invoked. | 174 // DidCommitProvisionalLoadForFrame was invoked. |
174 virtual void DidNavigateAnyFrame( | 175 virtual void DidNavigateAnyFrame( |
(...skipping 21 matching lines...) Expand all Loading... |
196 // pages, DidFinishLoad is invoked for frames that were not sending | 197 // pages, DidFinishLoad is invoked for frames that were not sending |
197 // navigational events before. It is safe to ignore these events. | 198 // navigational events before. It is safe to ignore these events. |
198 virtual void DidFinishLoad(RenderFrameHost* render_frame_host, | 199 virtual void DidFinishLoad(RenderFrameHost* render_frame_host, |
199 const GURL& validated_url) {} | 200 const GURL& validated_url) {} |
200 | 201 |
201 // This method is like DidFinishLoad, but when the load failed or was | 202 // This method is like DidFinishLoad, but when the load failed or was |
202 // cancelled, e.g. window.stop() is invoked. | 203 // cancelled, e.g. window.stop() is invoked. |
203 virtual void DidFailLoad(RenderFrameHost* render_frame_host, | 204 virtual void DidFailLoad(RenderFrameHost* render_frame_host, |
204 const GURL& validated_url, | 205 const GURL& validated_url, |
205 int error_code, | 206 int error_code, |
206 const base::string16& error_description) {} | 207 const base::string16& error_description, |
| 208 bool was_ignored_by_handler) {} |
207 | 209 |
208 // This method is invoked when content was loaded from an in-memory cache. | 210 // This method is invoked when content was loaded from an in-memory cache. |
209 virtual void DidLoadResourceFromMemoryCache( | 211 virtual void DidLoadResourceFromMemoryCache( |
210 const LoadFromMemoryCacheDetails& details) {} | 212 const LoadFromMemoryCacheDetails& details) {} |
211 | 213 |
212 // This method is invoked when a response has been received for a resource | 214 // This method is invoked when a response has been received for a resource |
213 // request. | 215 // request. |
214 virtual void DidGetResourceResponseStart( | 216 virtual void DidGetResourceResponseStart( |
215 const ResourceRequestDetails& details) {} | 217 const ResourceRequestDetails& details) {} |
216 | 218 |
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
386 void ResetWebContents(); | 388 void ResetWebContents(); |
387 | 389 |
388 WebContentsImpl* web_contents_; | 390 WebContentsImpl* web_contents_; |
389 | 391 |
390 DISALLOW_COPY_AND_ASSIGN(WebContentsObserver); | 392 DISALLOW_COPY_AND_ASSIGN(WebContentsObserver); |
391 }; | 393 }; |
392 | 394 |
393 } // namespace content | 395 } // namespace content |
394 | 396 |
395 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_OBSERVER_H_ | 397 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_OBSERVER_H_ |
OLD | NEW |