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"
13 SkBitmap
* ContentRendererClient::GetSadPluginBitmap() {
17 SkBitmap
* ContentRendererClient::GetSadWebViewBitmap() {
21 bool ContentRendererClient::OverrideCreatePlugin(
22 RenderFrame
* render_frame
,
23 blink::WebLocalFrame
* frame
,
24 const blink::WebPluginParams
& params
,
25 blink::WebPlugin
** plugin
) {
29 blink::WebPlugin
* ContentRendererClient::CreatePluginReplacement(
30 RenderFrame
* render_frame
,
31 const base::FilePath
& plugin_path
) {
35 bool ContentRendererClient::HasErrorPage(int http_status_code
,
36 std::string
* error_domain
) {
40 bool ContentRendererClient::ShouldSuppressErrorPage(RenderFrame
* render_frame
,
45 void ContentRendererClient::DeferMediaLoad(
46 RenderFrame
* render_frame
,
47 bool has_played_media_before
,
48 const base::Closure
& closure
) {
52 blink::WebMediaStreamCenter
*
53 ContentRendererClient::OverrideCreateWebMediaStreamCenter(
54 blink::WebMediaStreamCenterClient
* client
) {
58 blink::WebRTCPeerConnectionHandler
*
59 ContentRendererClient::OverrideCreateWebRTCPeerConnectionHandler(
60 blink::WebRTCPeerConnectionHandlerClient
* client
) {
64 blink::WebMIDIAccessor
*
65 ContentRendererClient::OverrideCreateMIDIAccessor(
66 blink::WebMIDIAccessorClient
* client
) {
70 blink::WebAudioDevice
*
71 ContentRendererClient::OverrideCreateAudioDevice(
76 blink::WebClipboard
* ContentRendererClient::OverrideWebClipboard() {
80 blink::WebThemeEngine
* ContentRendererClient::OverrideThemeEngine() {
84 blink::WebSpeechSynthesizer
* ContentRendererClient::OverrideSpeechSynthesizer(
85 blink::WebSpeechSynthesizerClient
* client
) {
89 bool ContentRendererClient::RunIdleHandlerWhenWidgetsHidden() {
93 bool ContentRendererClient::AllowTimerSuspensionWhenProcessBackgrounded() {
97 bool ContentRendererClient::AllowPopup() {
101 bool ContentRendererClient::ShouldFork(blink::WebLocalFrame
* frame
,
103 const std::string
& http_method
,
104 bool is_initial_navigation
,
105 bool is_server_redirect
,
106 bool* send_referrer
) {
110 bool ContentRendererClient::WillSendRequest(
111 blink::WebFrame
* frame
,
112 ui::PageTransition transition_type
,
114 const GURL
& first_party_for_cookies
,
119 unsigned long long ContentRendererClient::VisitedLinkHash(
120 const char* canonical_url
, size_t length
) {
124 bool ContentRendererClient::IsLinkVisited(unsigned long long link_hash
) {
128 blink::WebPrescientNetworking
*
129 ContentRendererClient::GetPrescientNetworking() {
133 bool ContentRendererClient::ShouldOverridePageVisibilityState(
134 const RenderFrame
* render_frame
,
135 blink::WebPageVisibilityState
* override_state
) {
139 const void* ContentRendererClient::CreatePPAPIInterface(
140 const std::string
& interface_name
) {
144 bool ContentRendererClient::IsExternalPepperPlugin(
145 const std::string
& module_name
) {
149 bool ContentRendererClient::AllowPepperMediaStreamAPI(const GURL
& url
) {
153 void ContentRendererClient::AddKeySystems(
154 std::vector
<media::KeySystemInfo
>* key_systems
) {
157 scoped_ptr
<media::RendererFactory
>
158 ContentRendererClient::CreateMediaRendererFactory(
159 RenderFrame
* render_frame
,
160 const scoped_refptr
<media::GpuVideoAcceleratorFactories
>& gpu_factories
,
161 const scoped_refptr
<media::MediaLog
>& media_log
) {
165 scoped_ptr
<MediaStreamRendererFactory
>
166 ContentRendererClient::CreateMediaStreamRendererFactory() {
170 bool ContentRendererClient::ShouldReportDetailedMessageForSource(
171 const base::string16
& source
) const {
175 bool ContentRendererClient::ShouldGatherSiteIsolationStats() const {
179 blink::WebWorkerContentSettingsClientProxy
*
180 ContentRendererClient::CreateWorkerContentSettingsClientProxy(
181 RenderFrame
* render_frame
, blink::WebFrame
* frame
) {
185 bool ContentRendererClient::IsPluginAllowedToUseCameraDeviceAPI(
190 bool ContentRendererClient::IsPluginAllowedToUseCompositorAPI(const GURL
& url
) {
194 bool ContentRendererClient::IsPluginAllowedToUseDevChannelAPIs() {
198 BrowserPluginDelegate
* ContentRendererClient::CreateBrowserPluginDelegate(
199 RenderFrame
* render_frame
,
200 const std::string
& mime_type
,
201 const GURL
& original_url
) {
205 std::string
ContentRendererClient::GetUserAgentOverrideForURL(const GURL
& url
) {
206 return std::string();
209 scoped_ptr
<blink::WebAppBannerClient
>
210 ContentRendererClient::CreateAppBannerClient(RenderFrame
* render_frame
) {
214 } // namespace content