Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(333)

Side by Side Diff: content/public/browser/web_contents_observer.h

Issue 1194383003: Add a flag showing whether the current request was ignored by a handler (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix trybot failures (DidFailProvisionalLoad calls in unit tests) Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 virtual void DidCommitProvisionalLoadForFrame( 156 virtual void DidCommitProvisionalLoadForFrame(
157 RenderFrameHost* render_frame_host, 157 RenderFrameHost* render_frame_host,
158 const GURL& url, 158 const GURL& url,
159 ui::PageTransition transition_type) {} 159 ui::PageTransition transition_type) {}
160 160
161 // This method is invoked when the provisional load failed. 161 // This method is invoked when the provisional load failed.
162 virtual void DidFailProvisionalLoad( 162 virtual void DidFailProvisionalLoad(
163 RenderFrameHost* render_frame_host, 163 RenderFrameHost* render_frame_host,
164 const GURL& validated_url, 164 const GURL& validated_url,
165 int error_code, 165 int error_code,
166 const base::string16& error_description) {} 166 const base::string16& error_description,
167 bool was_ignored_by_handler) {}
167 168
168 // If the provisional load corresponded to the main frame, this method is 169 // If the provisional load corresponded to the main frame, this method is
169 // invoked in addition to DidCommitProvisionalLoadForFrame. 170 // invoked in addition to DidCommitProvisionalLoadForFrame.
170 virtual void DidNavigateMainFrame( 171 virtual void DidNavigateMainFrame(
171 const LoadCommittedDetails& details, 172 const LoadCommittedDetails& details,
172 const FrameNavigateParams& params) {} 173 const FrameNavigateParams& params) {}
173 174
174 // And regardless of what frame navigated, this method is invoked after 175 // And regardless of what frame navigated, this method is invoked after
175 // DidCommitProvisionalLoadForFrame was invoked. 176 // DidCommitProvisionalLoadForFrame was invoked.
176 virtual void DidNavigateAnyFrame( 177 virtual void DidNavigateAnyFrame(
(...skipping 29 matching lines...) Expand all
206 // pages, DidFinishLoad is invoked for frames that were not sending 207 // pages, DidFinishLoad is invoked for frames that were not sending
207 // navigational events before. It is safe to ignore these events. 208 // navigational events before. It is safe to ignore these events.
208 virtual void DidFinishLoad(RenderFrameHost* render_frame_host, 209 virtual void DidFinishLoad(RenderFrameHost* render_frame_host,
209 const GURL& validated_url) {} 210 const GURL& validated_url) {}
210 211
211 // This method is like DidFinishLoad, but when the load failed or was 212 // This method is like DidFinishLoad, but when the load failed or was
212 // cancelled, e.g. window.stop() is invoked. 213 // cancelled, e.g. window.stop() is invoked.
213 virtual void DidFailLoad(RenderFrameHost* render_frame_host, 214 virtual void DidFailLoad(RenderFrameHost* render_frame_host,
214 const GURL& validated_url, 215 const GURL& validated_url,
215 int error_code, 216 int error_code,
216 const base::string16& error_description) {} 217 const base::string16& error_description,
218 bool was_ignored_by_handler) {}
217 219
218 // This method is invoked when content was loaded from an in-memory cache. 220 // This method is invoked when content was loaded from an in-memory cache.
219 virtual void DidLoadResourceFromMemoryCache( 221 virtual void DidLoadResourceFromMemoryCache(
220 const LoadFromMemoryCacheDetails& details) {} 222 const LoadFromMemoryCacheDetails& details) {}
221 223
222 // This method is invoked when a response has been received for a resource 224 // This method is invoked when a response has been received for a resource
223 // request. 225 // request.
224 virtual void DidGetResourceResponseStart( 226 virtual void DidGetResourceResponseStart(
225 const ResourceRequestDetails& details) {} 227 const ResourceRequestDetails& details) {}
226 228
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
401 void ResetWebContents(); 403 void ResetWebContents();
402 404
403 WebContentsImpl* web_contents_; 405 WebContentsImpl* web_contents_;
404 406
405 DISALLOW_COPY_AND_ASSIGN(WebContentsObserver); 407 DISALLOW_COPY_AND_ASSIGN(WebContentsObserver);
406 }; 408 };
407 409
408 } // namespace content 410 } // namespace content
409 411
410 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_OBSERVER_H_ 412 #endif // CONTENT_PUBLIC_BROWSER_WEB_CONTENTS_OBSERVER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698