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
3 // found in the LICENSE file.
5 #include "content/public/renderer/content_renderer_client.h"
7 #include "content/public/renderer/media_stream_renderer_factory.h"
8 #include "media/base/renderer_factory.h"
9 #include "third_party/WebKit/public/platform/modules/app_banner/WebAppBannerClient.h"
10 #include "third_party/WebKit/public/web/WebPluginPlaceholder.h"
14 SkBitmap
* ContentRendererClient::GetSadPluginBitmap() {
18 SkBitmap
* ContentRendererClient::GetSadWebViewBitmap() {
22 scoped_ptr
<blink::WebPluginPlaceholder
>
23 ContentRendererClient::CreatePluginPlaceholder(
24 RenderFrame
* render_frame
,
25 blink::WebLocalFrame
* frame
,
26 const blink::WebPluginParams
& params
) {
30 bool ContentRendererClient::OverrideCreatePlugin(
31 RenderFrame
* render_frame
,
32 blink::WebLocalFrame
* frame
,
33 const blink::WebPluginParams
& params
,
34 blink::WebPlugin
** plugin
) {
38 blink::WebPlugin
* ContentRendererClient::CreatePluginReplacement(
39 RenderFrame
* render_frame
,
40 const base::FilePath
& plugin_path
) {
44 bool ContentRendererClient::HasErrorPage(int http_status_code
,
45 std::string
* error_domain
) {
49 bool ContentRendererClient::ShouldSuppressErrorPage(RenderFrame
* render_frame
,
54 void ContentRendererClient::DeferMediaLoad(RenderFrame
* render_frame
,
55 const base::Closure
& closure
) {
59 blink::WebMediaStreamCenter
*
60 ContentRendererClient::OverrideCreateWebMediaStreamCenter(
61 blink::WebMediaStreamCenterClient
* client
) {
65 blink::WebRTCPeerConnectionHandler
*
66 ContentRendererClient::OverrideCreateWebRTCPeerConnectionHandler(
67 blink::WebRTCPeerConnectionHandlerClient
* client
) {
71 blink::WebMIDIAccessor
*
72 ContentRendererClient::OverrideCreateMIDIAccessor(
73 blink::WebMIDIAccessorClient
* client
) {
77 blink::WebAudioDevice
*
78 ContentRendererClient::OverrideCreateAudioDevice(
83 blink::WebClipboard
* ContentRendererClient::OverrideWebClipboard() {
87 blink::WebThemeEngine
* ContentRendererClient::OverrideThemeEngine() {
91 blink::WebSpeechSynthesizer
* ContentRendererClient::OverrideSpeechSynthesizer(
92 blink::WebSpeechSynthesizerClient
* client
) {
96 bool ContentRendererClient::RunIdleHandlerWhenWidgetsHidden() {
100 bool ContentRendererClient::AllowPopup() {
104 bool ContentRendererClient::ShouldFork(blink::WebLocalFrame
* frame
,
106 const std::string
& http_method
,
107 bool is_initial_navigation
,
108 bool is_server_redirect
,
109 bool* send_referrer
) {
113 bool ContentRendererClient::WillSendRequest(
114 blink::WebFrame
* frame
,
115 ui::PageTransition transition_type
,
117 const GURL
& first_party_for_cookies
,
122 unsigned long long ContentRendererClient::VisitedLinkHash(
123 const char* canonical_url
, size_t length
) {
127 bool ContentRendererClient::IsLinkVisited(unsigned long long link_hash
) {
131 blink::WebPrescientNetworking
*
132 ContentRendererClient::GetPrescientNetworking() {
136 bool ContentRendererClient::ShouldOverridePageVisibilityState(
137 const RenderFrame
* render_frame
,
138 blink::WebPageVisibilityState
* override_state
) {
142 const void* ContentRendererClient::CreatePPAPIInterface(
143 const std::string
& interface_name
) {
147 bool ContentRendererClient::IsExternalPepperPlugin(
148 const std::string
& module_name
) {
152 bool ContentRendererClient::AllowPepperMediaStreamAPI(const GURL
& url
) {
156 void ContentRendererClient::AddKeySystems(
157 std::vector
<media::KeySystemInfo
>* key_systems
) {
160 scoped_ptr
<media::RendererFactory
>
161 ContentRendererClient::CreateMediaRendererFactory(
162 RenderFrame
* render_frame
,
163 const scoped_refptr
<media::GpuVideoAcceleratorFactories
>& gpu_factories
,
164 const scoped_refptr
<media::MediaLog
>& media_log
) {
168 scoped_ptr
<MediaStreamRendererFactory
>
169 ContentRendererClient::CreateMediaStreamRendererFactory() {
173 bool ContentRendererClient::ShouldReportDetailedMessageForSource(
174 const base::string16
& source
) const {
178 bool ContentRendererClient::ShouldGatherSiteIsolationStats() const {
182 blink::WebWorkerContentSettingsClientProxy
*
183 ContentRendererClient::CreateWorkerContentSettingsClientProxy(
184 RenderFrame
* render_frame
, blink::WebFrame
* frame
) {
188 bool ContentRendererClient::IsPluginAllowedToUseCameraDeviceAPI(
193 bool ContentRendererClient::IsPluginAllowedToUseCompositorAPI(const GURL
& url
) {
197 bool ContentRendererClient::IsPluginAllowedToUseDevChannelAPIs() {
201 BrowserPluginDelegate
* ContentRendererClient::CreateBrowserPluginDelegate(
202 RenderFrame
* render_frame
,
203 const std::string
& mime_type
,
204 const GURL
& original_url
) {
208 std::string
ContentRendererClient::GetUserAgentOverrideForURL(const GURL
& url
) {
209 return std::string();
212 scoped_ptr
<blink::WebAppBannerClient
>
213 ContentRendererClient::CreateAppBannerClient(RenderFrame
* render_frame
) {
217 } // namespace content