| 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> |
| 11 #include <memory> |
| 11 #include <string> | 12 #include <string> |
| 12 #include <vector> | 13 #include <vector> |
| 13 | 14 |
| 14 #include "base/bind.h" | 15 #include "base/bind.h" |
| 15 #include "base/memory/ref_counted.h" | 16 #include "base/memory/ref_counted.h" |
| 16 #include "base/memory/scoped_ptr.h" | |
| 17 #include "base/strings/string16.h" | 17 #include "base/strings/string16.h" |
| 18 #include "build/build_config.h" | 18 #include "build/build_config.h" |
| 19 #include "content/public/common/content_client.h" | 19 #include "content/public/common/content_client.h" |
| 20 #include "third_party/WebKit/public/platform/WebPageVisibilityState.h" | 20 #include "third_party/WebKit/public/platform/WebPageVisibilityState.h" |
| 21 #include "third_party/WebKit/public/web/WebNavigationPolicy.h" | 21 #include "third_party/WebKit/public/web/WebNavigationPolicy.h" |
| 22 #include "third_party/WebKit/public/web/WebNavigationType.h" | 22 #include "third_party/WebKit/public/web/WebNavigationType.h" |
| 23 #include "ui/base/page_transition_types.h" | 23 #include "ui/base/page_transition_types.h" |
| 24 #include "v8/include/v8.h" | 24 #include "v8/include/v8.h" |
| 25 | 25 |
| 26 class GURL; | 26 class GURL; |
| (...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 250 blink::WebPageVisibilityState* override_state); | 250 blink::WebPageVisibilityState* override_state); |
| 251 | 251 |
| 252 // Returns true if the given Pepper plugin is external (requiring special | 252 // Returns true if the given Pepper plugin is external (requiring special |
| 253 // startup steps). | 253 // startup steps). |
| 254 virtual bool IsExternalPepperPlugin(const std::string& module_name); | 254 virtual bool IsExternalPepperPlugin(const std::string& module_name); |
| 255 | 255 |
| 256 // Returns true if the page at |url| can use Pepper MediaStream APIs. | 256 // Returns true if the page at |url| can use Pepper MediaStream APIs. |
| 257 virtual bool AllowPepperMediaStreamAPI(const GURL& url); | 257 virtual bool AllowPepperMediaStreamAPI(const GURL& url); |
| 258 | 258 |
| 259 // Allows an embedder to provide a media::RendererFactory. | 259 // Allows an embedder to provide a media::RendererFactory. |
| 260 virtual scoped_ptr<media::RendererFactory> CreateMediaRendererFactory( | 260 virtual std::unique_ptr<media::RendererFactory> CreateMediaRendererFactory( |
| 261 RenderFrame* render_frame, | 261 RenderFrame* render_frame, |
| 262 media::GpuVideoAcceleratorFactories* gpu_factories, | 262 media::GpuVideoAcceleratorFactories* gpu_factories, |
| 263 const scoped_refptr<media::MediaLog>& media_log); | 263 const scoped_refptr<media::MediaLog>& media_log); |
| 264 | 264 |
| 265 // Allows an embedder to provide a MediaStreamRendererFactory. | 265 // Allows an embedder to provide a MediaStreamRendererFactory. |
| 266 virtual scoped_ptr<MediaStreamRendererFactory> | 266 virtual std::unique_ptr<MediaStreamRendererFactory> |
| 267 CreateMediaStreamRendererFactory(); | 267 CreateMediaStreamRendererFactory(); |
| 268 | 268 |
| 269 // Allows an embedder to provde a cc::ImageSerializationProcessor. | 269 // Allows an embedder to provde a cc::ImageSerializationProcessor. |
| 270 virtual cc::ImageSerializationProcessor* GetImageSerializationProcessor(); | 270 virtual cc::ImageSerializationProcessor* GetImageSerializationProcessor(); |
| 271 | 271 |
| 272 // Gives the embedder a chance to register the key system(s) it supports by | 272 // Gives the embedder a chance to register the key system(s) it supports by |
| 273 // populating |key_systems|. | 273 // populating |key_systems|. |
| 274 virtual void AddKeySystems(std::vector<media::KeySystemInfo>* key_systems); | 274 virtual void AddKeySystems(std::vector<media::KeySystemInfo>* key_systems); |
| 275 | 275 |
| 276 // Returns true if we should report a detailed message (including a stack | 276 // Returns true if we should report a detailed message (including a stack |
| (...skipping 25 matching lines...) Expand all Loading... |
| 302 // Records a sample string to a Rappor privacy-preserving metric. | 302 // Records a sample string to a Rappor privacy-preserving metric. |
| 303 // See: https://www.chromium.org/developers/design-documents/rappor | 303 // See: https://www.chromium.org/developers/design-documents/rappor |
| 304 virtual void RecordRappor(const std::string& metric, | 304 virtual void RecordRappor(const std::string& metric, |
| 305 const std::string& sample) {} | 305 const std::string& sample) {} |
| 306 | 306 |
| 307 // Records a domain and registry of a url to a Rappor privacy-preserving | 307 // Records a domain and registry of a url to a Rappor privacy-preserving |
| 308 // metric. See: https://www.chromium.org/developers/design-documents/rappor | 308 // metric. See: https://www.chromium.org/developers/design-documents/rappor |
| 309 virtual void RecordRapporURL(const std::string& metric, const GURL& url) {} | 309 virtual void RecordRapporURL(const std::string& metric, const GURL& url) {} |
| 310 | 310 |
| 311 // Allows an embedder to provide a blink::WebAppBannerClient. | 311 // Allows an embedder to provide a blink::WebAppBannerClient. |
| 312 virtual scoped_ptr<blink::WebAppBannerClient> CreateAppBannerClient( | 312 virtual std::unique_ptr<blink::WebAppBannerClient> CreateAppBannerClient( |
| 313 RenderFrame* render_frame); | 313 RenderFrame* render_frame); |
| 314 | 314 |
| 315 // Gives the embedder a chance to add properties to the context menu. | 315 // Gives the embedder a chance to add properties to the context menu. |
| 316 // Currently only called when the context menu is for an image. | 316 // Currently only called when the context menu is for an image. |
| 317 virtual void AddImageContextMenuProperties( | 317 virtual void AddImageContextMenuProperties( |
| 318 const blink::WebURLResponse& response, | 318 const blink::WebURLResponse& response, |
| 319 std::map<std::string, std::string>* properties) {} | 319 std::map<std::string, std::string>* properties) {} |
| 320 | 320 |
| 321 // Notifies that a document element has been inserted in the frame's document. | 321 // Notifies that a document element has been inserted in the frame's document. |
| 322 // This may be called multiple times for the same document. This method may | 322 // This may be called multiple times for the same document. This method may |
| (...skipping 17 matching lines...) Expand all Loading... |
| 340 const GURL& url) {} | 340 const GURL& url) {} |
| 341 | 341 |
| 342 // Whether this renderer should enforce preferences related to the WebRTC | 342 // Whether this renderer should enforce preferences related to the WebRTC |
| 343 // routing logic, i.e. allowing multiple routes and non-proxied UDP. | 343 // routing logic, i.e. allowing multiple routes and non-proxied UDP. |
| 344 virtual bool ShouldEnforceWebRTCRoutingPreferences(); | 344 virtual bool ShouldEnforceWebRTCRoutingPreferences(); |
| 345 }; | 345 }; |
| 346 | 346 |
| 347 } // namespace content | 347 } // namespace content |
| 348 | 348 |
| 349 #endif // CONTENT_PUBLIC_RENDERER_CONTENT_RENDERER_CLIENT_H_ | 349 #endif // CONTENT_PUBLIC_RENDERER_CONTENT_RENDERER_CLIENT_H_ |
| OLD | NEW |