 Chromium Code Reviews
 Chromium Code Reviews Issue 2900563002:
  Network service: Safe browsing check for sub-resources from renderer.  (Closed)
    
  
    Issue 2900563002:
  Network service: Safe browsing check for sub-resources from renderer.  (Closed) 
  | 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_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 Loading... | |
| 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 Loading... | |
| 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|. | 
| 227 virtual bool WillSendRequest(blink::WebLocalFrame* frame, | 228 // |throttles| is appended with URLLoaderThrottle instances that should be | 
| 
vakh (use Gerrit instead)
2017/05/31 23:53:09
Nit: These three comments could be in one paragrap
 
yzshen1
2017/06/01 17:45:04
Done.
 | |
| 228 ui::PageTransition transition_type, | 229 // applied to the resource loading. It is only used when network service is | 
| 229 const blink::WebURL& url, | 230 // enabled. | 
| 230 GURL* new_url); | 231 // If the function returns true, the url is changed to |new_url|. | 
| 232 virtual bool WillSendRequest( | |
| 233 blink::WebLocalFrame* frame, | |
| 234 ui::PageTransition transition_type, | |
| 235 const blink::WebURL& url, | |
| 236 std::vector<std::unique_ptr<URLLoaderThrottle>>* throttles, | |
| 237 GURL* new_url); | |
| 231 | 238 | 
| 232 // Returns true if the request is associated with a document that is in | 239 // Returns true if the request is associated with a document that is in | 
| 233 // ""prefetch only" mode, and will not be rendered. | 240 // ""prefetch only" mode, and will not be rendered. | 
| 234 virtual bool IsPrefetchOnly(RenderFrame* render_frame, | 241 virtual bool IsPrefetchOnly(RenderFrame* render_frame, | 
| 235 const blink::WebURLRequest& request); | 242 const blink::WebURLRequest& request); | 
| 236 | 243 | 
| 237 // See blink::Platform. | 244 // See blink::Platform. | 
| 238 virtual unsigned long long VisitedLinkHash(const char* canonical_url, | 245 virtual unsigned long long VisitedLinkHash(const char* canonical_url, | 
| 239 size_t length); | 246 size_t length); | 
| 240 virtual bool IsLinkVisited(unsigned long long link_hash); | 247 virtual bool IsLinkVisited(unsigned long long link_hash); | 
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 360 virtual std::unique_ptr<base::TaskScheduler::InitParams> | 367 virtual std::unique_ptr<base::TaskScheduler::InitParams> | 
| 361 GetTaskSchedulerInitParams(); | 368 GetTaskSchedulerInitParams(); | 
| 362 | 369 | 
| 363 // Returns true if the media pipeline can be suspended, or false otherwise. | 370 // Returns true if the media pipeline can be suspended, or false otherwise. | 
| 364 virtual bool AllowMediaSuspend(); | 371 virtual bool AllowMediaSuspend(); | 
| 365 }; | 372 }; | 
| 366 | 373 | 
| 367 } // namespace content | 374 } // namespace content | 
| 368 | 375 | 
| 369 #endif // CONTENT_PUBLIC_RENDERER_CONTENT_RENDERER_CLIENT_H_ | 376 #endif // CONTENT_PUBLIC_RENDERER_CONTENT_RENDERER_CLIENT_H_ | 
| OLD | NEW |