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.
4
5 #include "content/public/renderer/content_renderer_client.h"
6
7 namespace content {
8
GetSadPluginBitmap()9 SkBitmap* ContentRendererClient::GetSadPluginBitmap() {
10 return NULL;
11 }
12
GetSadWebViewBitmap()13 SkBitmap* ContentRendererClient::GetSadWebViewBitmap() {
14 return NULL;
15 }
16
OverrideCreatePlugin(RenderFrame * render_frame,blink::WebLocalFrame * frame,const blink::WebPluginParams & params,blink::WebPlugin ** plugin)17 bool ContentRendererClient::OverrideCreatePlugin(
18 RenderFrame* render_frame,
19 blink::WebLocalFrame* frame,
20 const blink::WebPluginParams& params,
21 blink::WebPlugin** plugin) {
22 return false;
23 }
24
CreatePluginReplacement(RenderFrame * render_frame,const base::FilePath & plugin_path)25 blink::WebPlugin* ContentRendererClient::CreatePluginReplacement(
26 RenderFrame* render_frame,
27 const base::FilePath& plugin_path) {
28 return NULL;
29 }
30
HasErrorPage(int http_status_code,std::string * error_domain)31 bool ContentRendererClient::HasErrorPage(int http_status_code,
32 std::string* error_domain) {
33 return false;
34 }
35
ShouldSuppressErrorPage(RenderFrame * render_frame,const GURL & url)36 bool ContentRendererClient::ShouldSuppressErrorPage(RenderFrame* render_frame,
37 const GURL& url) {
38 return false;
39 }
40
DeferMediaLoad(RenderFrame * render_frame,const base::Closure & closure)41 void ContentRendererClient::DeferMediaLoad(RenderFrame* render_frame,
42 const base::Closure& closure) {
43 closure.Run();
44 }
45
46 blink::WebMediaStreamCenter*
OverrideCreateWebMediaStreamCenter(blink::WebMediaStreamCenterClient * client)47 ContentRendererClient::OverrideCreateWebMediaStreamCenter(
48 blink::WebMediaStreamCenterClient* client) {
49 return NULL;
50 }
51
52 blink::WebRTCPeerConnectionHandler*
OverrideCreateWebRTCPeerConnectionHandler(blink::WebRTCPeerConnectionHandlerClient * client)53 ContentRendererClient::OverrideCreateWebRTCPeerConnectionHandler(
54 blink::WebRTCPeerConnectionHandlerClient* client) {
55 return NULL;
56 }
57
58 blink::WebMIDIAccessor*
OverrideCreateMIDIAccessor(blink::WebMIDIAccessorClient * client)59 ContentRendererClient::OverrideCreateMIDIAccessor(
60 blink::WebMIDIAccessorClient* client) {
61 return NULL;
62 }
63
64 blink::WebAudioDevice*
OverrideCreateAudioDevice(double sample_rate)65 ContentRendererClient::OverrideCreateAudioDevice(
66 double sample_rate) {
67 return NULL;
68 }
69
OverrideWebClipboard()70 blink::WebClipboard* ContentRendererClient::OverrideWebClipboard() {
71 return NULL;
72 }
73
OverrideThemeEngine()74 blink::WebThemeEngine* ContentRendererClient::OverrideThemeEngine() {
75 return NULL;
76 }
77
OverrideSpeechSynthesizer(blink::WebSpeechSynthesizerClient * client)78 blink::WebSpeechSynthesizer* ContentRendererClient::OverrideSpeechSynthesizer(
79 blink::WebSpeechSynthesizerClient* client) {
80 return NULL;
81 }
82
RunIdleHandlerWhenWidgetsHidden()83 bool ContentRendererClient::RunIdleHandlerWhenWidgetsHidden() {
84 return true;
85 }
86
AllowPopup()87 bool ContentRendererClient::AllowPopup() {
88 return false;
89 }
90
91 #ifdef OS_ANDROID
HandleNavigation(RenderFrame * render_frame,DocumentState * document_state,int opener_id,blink::WebFrame * frame,const blink::WebURLRequest & request,blink::WebNavigationType type,blink::WebNavigationPolicy default_policy,bool is_redirect)92 bool ContentRendererClient::HandleNavigation(
93 RenderFrame* render_frame,
94 DocumentState* document_state,
95 int opener_id,
96 blink::WebFrame* frame,
97 const blink::WebURLRequest& request,
98 blink::WebNavigationType type,
99 blink::WebNavigationPolicy default_policy,
100 bool is_redirect) {
101 return false;
102 }
103 #endif
104
ShouldFork(blink::WebFrame * frame,const GURL & url,const std::string & http_method,bool is_initial_navigation,bool is_server_redirect,bool * send_referrer)105 bool ContentRendererClient::ShouldFork(blink::WebFrame* frame,
106 const GURL& url,
107 const std::string& http_method,
108 bool is_initial_navigation,
109 bool is_server_redirect,
110 bool* send_referrer) {
111 return false;
112 }
113
WillSendRequest(blink::WebFrame * frame,ui::PageTransition transition_type,const GURL & url,const GURL & first_party_for_cookies,GURL * new_url)114 bool ContentRendererClient::WillSendRequest(
115 blink::WebFrame* frame,
116 ui::PageTransition transition_type,
117 const GURL& url,
118 const GURL& first_party_for_cookies,
119 GURL* new_url) {
120 return false;
121 }
122
VisitedLinkHash(const char * canonical_url,size_t length)123 unsigned long long ContentRendererClient::VisitedLinkHash(
124 const char* canonical_url, size_t length) {
125 return 0LL;
126 }
127
IsLinkVisited(unsigned long long link_hash)128 bool ContentRendererClient::IsLinkVisited(unsigned long long link_hash) {
129 return false;
130 }
131
132 blink::WebPrescientNetworking*
GetPrescientNetworking()133 ContentRendererClient::GetPrescientNetworking() {
134 return NULL;
135 }
136
ShouldOverridePageVisibilityState(const RenderFrame * render_frame,blink::WebPageVisibilityState * override_state)137 bool ContentRendererClient::ShouldOverridePageVisibilityState(
138 const RenderFrame* render_frame,
139 blink::WebPageVisibilityState* override_state) {
140 return false;
141 }
142
CreatePPAPIInterface(const std::string & interface_name)143 const void* ContentRendererClient::CreatePPAPIInterface(
144 const std::string& interface_name) {
145 return NULL;
146 }
147
IsExternalPepperPlugin(const std::string & module_name)148 bool ContentRendererClient::IsExternalPepperPlugin(
149 const std::string& module_name) {
150 return false;
151 }
152
AllowPepperMediaStreamAPI(const GURL & url)153 bool ContentRendererClient::AllowPepperMediaStreamAPI(const GURL& url) {
154 return false;
155 }
156
AddKeySystems(std::vector<KeySystemInfo> * key_systems)157 void ContentRendererClient::AddKeySystems(
158 std::vector<KeySystemInfo>* key_systems) {
159 }
160
ShouldReportDetailedMessageForSource(const base::string16 & source) const161 bool ContentRendererClient::ShouldReportDetailedMessageForSource(
162 const base::string16& source) const {
163 return false;
164 }
165
ShouldEnableSiteIsolationPolicy() const166 bool ContentRendererClient::ShouldEnableSiteIsolationPolicy() const {
167 return true;
168 }
169
170 blink::WebWorkerPermissionClientProxy*
CreateWorkerPermissionClientProxy(RenderFrame * render_frame,blink::WebFrame * frame)171 ContentRendererClient::CreateWorkerPermissionClientProxy(
172 RenderFrame* render_frame, blink::WebFrame* frame) {
173 return NULL;
174 }
175
IsPluginAllowedToUseCompositorAPI(const GURL & url)176 bool ContentRendererClient::IsPluginAllowedToUseCompositorAPI(const GURL& url) {
177 return false;
178 }
179
IsPluginAllowedToUseVideoDecodeAPI(const GURL & url)180 bool ContentRendererClient::IsPluginAllowedToUseVideoDecodeAPI(
181 const GURL& url) {
182 return false;
183 }
184
IsPluginAllowedToUseDevChannelAPIs()185 bool ContentRendererClient::IsPluginAllowedToUseDevChannelAPIs() {
186 return false;
187 }
188
CreateBrowserPluginDelegate(RenderFrame * render_frame,const std::string & mime_type)189 BrowserPluginDelegate* ContentRendererClient::CreateBrowserPluginDelegate(
190 RenderFrame* render_frame,
191 const std::string& mime_type) {
192 return NULL;
193 }
194
195 } // namespace content
196