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

Side by Side Diff: content/public/renderer/content_renderer_client.h

Issue 2900563002: Network service: Safe browsing check for sub-resources from renderer. (Closed)
Patch Set: . Created 3 years, 7 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_RENDERER_CONTENT_RENDERER_CLIENT_H_ 5 #ifndef CONTENT_PUBLIC_RENDERER_CONTENT_RENDERER_CLIENT_H_
6 #define CONTENT_PUBLIC_RENDERER_CONTENT_RENDERER_CLIENT_H_ 6 #define CONTENT_PUBLIC_RENDERER_CONTENT_RENDERER_CLIENT_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 59
60 namespace media { 60 namespace media {
61 class KeySystemProperties; 61 class KeySystemProperties;
62 } 62 }
63 63
64 namespace content { 64 namespace content {
65 class BrowserPluginDelegate; 65 class BrowserPluginDelegate;
66 class MediaStreamRendererFactory; 66 class MediaStreamRendererFactory;
67 class RenderFrame; 67 class RenderFrame;
68 class RenderView; 68 class RenderView;
69 class URLLoaderThrottle;
69 70
70 // Embedder API for participating in renderer logic. 71 // Embedder API for participating in renderer logic.
71 class CONTENT_EXPORT ContentRendererClient { 72 class CONTENT_EXPORT ContentRendererClient {
72 public: 73 public:
73 virtual ~ContentRendererClient() {} 74 virtual ~ContentRendererClient() {}
74 75
75 // Notifies us that the RenderThread has been created. 76 // Notifies us that the RenderThread has been created.
76 virtual void RenderThreadStarted() {} 77 virtual void RenderThreadStarted() {}
77 78
78 // Notifies that a new RenderFrame has been created. 79 // Notifies that a new RenderFrame has been created.
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 // header will be send for the navigation. Otherwise, the referrer header is 217 // header will be send for the navigation. Otherwise, the referrer header is
217 // set according to the frame's referrer policy. 218 // set according to the frame's referrer policy.
218 virtual bool ShouldFork(blink::WebLocalFrame* frame, 219 virtual bool ShouldFork(blink::WebLocalFrame* frame,
219 const GURL& url, 220 const GURL& url,
220 const std::string& http_method, 221 const std::string& http_method,
221 bool is_initial_navigation, 222 bool is_initial_navigation,
222 bool is_server_redirect, 223 bool is_server_redirect,
223 bool* send_referrer); 224 bool* send_referrer);
224 225
225 // Notifies the embedder that the given frame is requesting the resource at 226 // Notifies the embedder that the given frame is requesting the resource at
226 // |url|. If the function returns true, the url is changed to |new_url|. 227 // |url|. If the function returns true, the url is changed to |new_url|.
kinuko 2017/05/29 13:36:50 Add a comment about throttles?
yzshen1 2017/05/31 00:30:05 Done.
227 virtual bool WillSendRequest(blink::WebLocalFrame* frame, 228 virtual bool WillSendRequest(
228 ui::PageTransition transition_type, 229 blink::WebLocalFrame* frame,
229 const blink::WebURL& url, 230 ui::PageTransition transition_type,
230 GURL* new_url); 231 const blink::WebURL& url,
232 GURL* new_url,
233 std::vector<std::unique_ptr<URLLoaderThrottle>>* throttles);
231 234
232 // Returns true if the request is associated with a document that is in 235 // Returns true if the request is associated with a document that is in
233 // ""prefetch only" mode, and will not be rendered. 236 // ""prefetch only" mode, and will not be rendered.
234 virtual bool IsPrefetchOnly(RenderFrame* render_frame, 237 virtual bool IsPrefetchOnly(RenderFrame* render_frame,
235 const blink::WebURLRequest& request); 238 const blink::WebURLRequest& request);
236 239
237 // See blink::Platform. 240 // See blink::Platform.
238 virtual unsigned long long VisitedLinkHash(const char* canonical_url, 241 virtual unsigned long long VisitedLinkHash(const char* canonical_url,
239 size_t length); 242 size_t length);
240 virtual bool IsLinkVisited(unsigned long long link_hash); 243 virtual bool IsLinkVisited(unsigned long long link_hash);
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
360 virtual std::unique_ptr<base::TaskScheduler::InitParams> 363 virtual std::unique_ptr<base::TaskScheduler::InitParams>
361 GetTaskSchedulerInitParams(); 364 GetTaskSchedulerInitParams();
362 365
363 // Returns true if the media pipeline can be suspended, or false otherwise. 366 // Returns true if the media pipeline can be suspended, or false otherwise.
364 virtual bool AllowMediaSuspend(); 367 virtual bool AllowMediaSuspend();
365 }; 368 };
366 369
367 } // namespace content 370 } // namespace content
368 371
369 #endif // CONTENT_PUBLIC_RENDERER_CONTENT_RENDERER_CLIENT_H_ 372 #endif // CONTENT_PUBLIC_RENDERER_CONTENT_RENDERER_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698