| 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|. |throttles| is appended with URLLoaderThrottle instances that should |
| 227 virtual bool WillSendRequest(blink::WebLocalFrame* frame, | 228 // be applied to the resource loading. It is only used when network service is |
| 228 ui::PageTransition transition_type, | 229 // enabled. If the function returns true, the url is changed to |new_url|. |
| 229 const blink::WebURL& url, | 230 virtual bool WillSendRequest( |
| 230 GURL* new_url); | 231 blink::WebLocalFrame* frame, |
| 232 ui::PageTransition transition_type, |
| 233 const blink::WebURL& url, |
| 234 std::vector<std::unique_ptr<URLLoaderThrottle>>* throttles, |
| 235 GURL* new_url); |
| 231 | 236 |
| 232 // Returns true if the request is associated with a document that is in | 237 // Returns true if the request is associated with a document that is in |
| 233 // ""prefetch only" mode, and will not be rendered. | 238 // ""prefetch only" mode, and will not be rendered. |
| 234 virtual bool IsPrefetchOnly(RenderFrame* render_frame, | 239 virtual bool IsPrefetchOnly(RenderFrame* render_frame, |
| 235 const blink::WebURLRequest& request); | 240 const blink::WebURLRequest& request); |
| 236 | 241 |
| 237 // See blink::Platform. | 242 // See blink::Platform. |
| 238 virtual unsigned long long VisitedLinkHash(const char* canonical_url, | 243 virtual unsigned long long VisitedLinkHash(const char* canonical_url, |
| 239 size_t length); | 244 size_t length); |
| 240 virtual bool IsLinkVisited(unsigned long long link_hash); | 245 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> | 365 virtual std::unique_ptr<base::TaskScheduler::InitParams> |
| 361 GetTaskSchedulerInitParams(); | 366 GetTaskSchedulerInitParams(); |
| 362 | 367 |
| 363 // Returns true if the media pipeline can be suspended, or false otherwise. | 368 // Returns true if the media pipeline can be suspended, or false otherwise. |
| 364 virtual bool AllowMediaSuspend(); | 369 virtual bool AllowMediaSuspend(); |
| 365 }; | 370 }; |
| 366 | 371 |
| 367 } // namespace content | 372 } // namespace content |
| 368 | 373 |
| 369 #endif // CONTENT_PUBLIC_RENDERER_CONTENT_RENDERER_CLIENT_H_ | 374 #endif // CONTENT_PUBLIC_RENDERER_CONTENT_RENDERER_CLIENT_H_ |
| OLD | NEW |