blob: 4757bbf94401229fcea6fbcac472db20eae1bb13 [file] [log] [blame]
[email protected]22cf0092012-05-30 00:03:101// 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
jochen51265132015-05-28 07:33:457#include "content/public/renderer/media_stream_renderer_factory.h"
xhwang6fa356202014-12-11 00:44:128#include "media/base/renderer_factory.h"
benwells04ab5b962015-05-06 08:29:409#include "third_party/WebKit/public/platform/modules/app_banner/WebAppBannerClient.h"
jbroman73e9f7962014-10-30 00:43:4510
[email protected]22cf0092012-05-30 00:03:1011namespace content {
12
13SkBitmap* ContentRendererClient::GetSadPluginBitmap() {
jbroman73e9f7962014-10-30 00:43:4514 return nullptr;
[email protected]22cf0092012-05-30 00:03:1015}
16
[email protected]d4d54b32012-11-19 16:14:4417SkBitmap* ContentRendererClient::GetSadWebViewBitmap() {
jbroman73e9f7962014-10-30 00:43:4518 return nullptr;
19}
20
[email protected]22cf0092012-05-30 00:03:1021bool ContentRendererClient::OverrideCreatePlugin(
[email protected]271ff5792013-12-04 22:29:3122 RenderFrame* render_frame,
[email protected]a41dec92014-04-12 02:47:5223 blink::WebLocalFrame* frame,
[email protected]180ef242013-11-07 06:50:4624 const blink::WebPluginParams& params,
25 blink::WebPlugin** plugin) {
[email protected]22cf0092012-05-30 00:03:1026 return false;
27}
28
[email protected]180ef242013-11-07 06:50:4629blink::WebPlugin* ContentRendererClient::CreatePluginReplacement(
[email protected]271ff5792013-12-04 22:29:3130 RenderFrame* render_frame,
[email protected]a3ef4832013-02-02 05:12:3331 const base::FilePath& plugin_path) {
jbroman73e9f7962014-10-30 00:43:4532 return nullptr;
[email protected]22cf0092012-05-30 00:03:1033}
34
35bool ContentRendererClient::HasErrorPage(int http_status_code,
36 std::string* error_domain) {
37 return false;
38}
39
[email protected]24a57cc2014-01-10 22:45:3040bool ContentRendererClient::ShouldSuppressErrorPage(RenderFrame* render_frame,
41 const GURL& url) {
[email protected]2309e912013-10-01 01:33:3042 return false;
43}
44
dalecurtis0f9e7f4c2015-08-19 00:12:5545void ContentRendererClient::DeferMediaLoad(
46 RenderFrame* render_frame,
47 bool has_played_media_before,
48 const base::Closure& closure) {
[email protected]d726eddc2013-07-02 22:25:5549 closure.Run();
[email protected]22cf0092012-05-30 00:03:1050}
51
[email protected]180ef242013-11-07 06:50:4652blink::WebMediaStreamCenter*
[email protected]68e5fee2013-02-18 10:04:2253ContentRendererClient::OverrideCreateWebMediaStreamCenter(
[email protected]180ef242013-11-07 06:50:4654 blink::WebMediaStreamCenterClient* client) {
jbroman73e9f7962014-10-30 00:43:4555 return nullptr;
[email protected]68e5fee2013-02-18 10:04:2256}
57
[email protected]180ef242013-11-07 06:50:4658blink::WebRTCPeerConnectionHandler*
[email protected]68e5fee2013-02-18 10:04:2259ContentRendererClient::OverrideCreateWebRTCPeerConnectionHandler(
[email protected]180ef242013-11-07 06:50:4660 blink::WebRTCPeerConnectionHandlerClient* client) {
jbroman73e9f7962014-10-30 00:43:4561 return nullptr;
[email protected]68e5fee2013-02-18 10:04:2262}
63
[email protected]180ef242013-11-07 06:50:4664blink::WebMIDIAccessor*
[email protected]fb0ab0d2013-06-26 19:29:2165ContentRendererClient::OverrideCreateMIDIAccessor(
[email protected]180ef242013-11-07 06:50:4666 blink::WebMIDIAccessorClient* client) {
jbroman73e9f7962014-10-30 00:43:4567 return nullptr;
[email protected]fb0ab0d2013-06-26 19:29:2168}
69
[email protected]180ef242013-11-07 06:50:4670blink::WebAudioDevice*
[email protected]f065ec52013-07-13 09:55:5471ContentRendererClient::OverrideCreateAudioDevice(
72 double sample_rate) {
jbroman73e9f7962014-10-30 00:43:4573 return nullptr;
[email protected]f065ec52013-07-13 09:55:5474}
75
[email protected]180ef242013-11-07 06:50:4676blink::WebClipboard* ContentRendererClient::OverrideWebClipboard() {
jbroman73e9f7962014-10-30 00:43:4577 return nullptr;
[email protected]9671a312013-02-23 06:27:3778}
79
[email protected]180ef242013-11-07 06:50:4680blink::WebThemeEngine* ContentRendererClient::OverrideThemeEngine() {
jbroman73e9f7962014-10-30 00:43:4581 return nullptr;
[email protected]60fe46e02013-03-20 19:49:5682}
83
[email protected]180ef242013-11-07 06:50:4684blink::WebSpeechSynthesizer* ContentRendererClient::OverrideSpeechSynthesizer(
85 blink::WebSpeechSynthesizerClient* client) {
jbroman73e9f7962014-10-30 00:43:4586 return nullptr;
[email protected]7a06d282013-05-03 04:39:3387}
88
[email protected]22cf0092012-05-30 00:03:1089bool ContentRendererClient::RunIdleHandlerWhenWidgetsHidden() {
[email protected]29cd1102014-07-25 04:16:0090 return true;
[email protected]22cf0092012-05-30 00:03:1091}
92
jdduke73220f02015-09-04 17:03:5193bool ContentRendererClient::AllowTimerSuspensionWhenProcessBackgrounded() {
94 return false;
95}
96
[email protected]434bc9b2012-11-27 21:22:1497bool ContentRendererClient::AllowPopup() {
[email protected]22cf0092012-05-30 00:03:1098 return false;
99}
100
alexmos49cf11a2015-06-08 22:57:35101bool ContentRendererClient::ShouldFork(blink::WebLocalFrame* frame,
[email protected]22cf0092012-05-30 00:03:10102 const GURL& url,
[email protected]c5dec6292013-01-25 04:54:52103 const std::string& http_method,
[email protected]22cf0092012-05-30 00:03:10104 bool is_initial_navigation,
[email protected]b0a29f22013-05-30 23:00:09105 bool is_server_redirect,
[email protected]22cf0092012-05-30 00:03:10106 bool* send_referrer) {
107 return false;
108}
109
[email protected]e1ed5a12012-08-08 19:57:44110bool ContentRendererClient::WillSendRequest(
[email protected]180ef242013-11-07 06:50:46111 blink::WebFrame* frame,
Sylvain Defresnec6ccc77d2014-09-19 10:19:35112 ui::PageTransition transition_type,
[email protected]e1ed5a12012-08-08 19:57:44113 const GURL& url,
[email protected]53d96fb2012-11-27 15:36:27114 const GURL& first_party_for_cookies,
[email protected]e1ed5a12012-08-08 19:57:44115 GURL* new_url) {
[email protected]22cf0092012-05-30 00:03:10116 return false;
117}
118
[email protected]22cf0092012-05-30 00:03:10119unsigned long long ContentRendererClient::VisitedLinkHash(
120 const char* canonical_url, size_t length) {
121 return 0LL;
122}
123
124bool ContentRendererClient::IsLinkVisited(unsigned long long link_hash) {
125 return false;
126}
127
[email protected]180ef242013-11-07 06:50:46128blink::WebPrescientNetworking*
[email protected]b1e7562d2013-05-27 05:47:53129ContentRendererClient::GetPrescientNetworking() {
jbroman73e9f7962014-10-30 00:43:45130 return nullptr;
[email protected]b1e7562d2013-05-27 05:47:53131}
132
[email protected]22cf0092012-05-30 00:03:10133bool ContentRendererClient::ShouldOverridePageVisibilityState(
[email protected]b849847b2013-12-10 21:57:58134 const RenderFrame* render_frame,
[email protected]180ef242013-11-07 06:50:46135 blink::WebPageVisibilityState* override_state) {
[email protected]22cf0092012-05-30 00:03:10136 return false;
137}
138
[email protected]f3ecd3c2013-07-23 16:47:21139const void* ContentRendererClient::CreatePPAPIInterface(
140 const std::string& interface_name) {
jbroman73e9f7962014-10-30 00:43:45141 return nullptr;
[email protected]f3ecd3c2013-07-23 16:47:21142}
143
[email protected]b66bbbc52013-08-09 20:07:02144bool ContentRendererClient::IsExternalPepperPlugin(
145 const std::string& module_name) {
146 return false;
147}
148
[email protected]b66bbbc52013-08-09 20:07:02149bool ContentRendererClient::AllowPepperMediaStreamAPI(const GURL& url) {
[email protected]24fe6122013-06-18 21:48:28150 return false;
151}
152
[email protected]aeaae2f2013-09-13 07:12:20153void ContentRendererClient::AddKeySystems(
xhwang1c03e832014-10-24 00:03:26154 std::vector<media::KeySystemInfo>* key_systems) {
[email protected]aeaae2f2013-09-13 07:12:20155}
156
xhwang6fa356202014-12-11 00:44:12157scoped_ptr<media::RendererFactory>
servolk04b66782015-02-20 18:44:51158ContentRendererClient::CreateMediaRendererFactory(
159 RenderFrame* render_frame,
halliwell80201d12015-06-26 21:41:14160 const scoped_refptr<media::GpuVideoAcceleratorFactories>& gpu_factories,
servolk04b66782015-02-20 18:44:51161 const scoped_refptr<media::MediaLog>& media_log) {
xhwang6fa356202014-12-11 00:44:12162 return nullptr;
xhwang58dced82014-11-13 23:54:10163}
164
jochen51265132015-05-28 07:33:45165scoped_ptr<MediaStreamRendererFactory>
166ContentRendererClient::CreateMediaStreamRendererFactory() {
167 return nullptr;
168}
169
[email protected]fd8eb742013-08-22 00:42:00170bool ContentRendererClient::ShouldReportDetailedMessageForSource(
171 const base::string16& source) const {
172 return false;
173}
174
nick88299ba2015-06-16 23:57:41175bool ContentRendererClient::ShouldGatherSiteIsolationStats() const {
[email protected]55dd9332013-09-04 17:17:50176 return true;
177}
178
mlamouria5b294552015-03-09 16:16:36179blink::WebWorkerContentSettingsClientProxy*
180ContentRendererClient::CreateWorkerContentSettingsClientProxy(
[email protected]a86c0e962013-12-17 17:10:39181 RenderFrame* render_frame, blink::WebFrame* frame) {
jbroman73e9f7962014-10-30 00:43:45182 return nullptr;
[email protected]44fb3fe2013-11-01 05:38:17183}
184
jchuang586e3db2015-02-25 05:17:56185bool ContentRendererClient::IsPluginAllowedToUseCameraDeviceAPI(
186 const GURL& url) {
187 return false;
188}
189
[email protected]72630d52014-07-07 21:30:21190bool ContentRendererClient::IsPluginAllowedToUseCompositorAPI(const GURL& url) {
191 return false;
192}
193
[email protected]72630d52014-07-07 21:30:21194bool ContentRendererClient::IsPluginAllowedToUseDevChannelAPIs() {
195 return false;
196}
197
lazyboyabce7812014-09-06 13:22:51198BrowserPluginDelegate* ContentRendererClient::CreateBrowserPluginDelegate(
199 RenderFrame* render_frame,
raymes976549372014-11-07 01:26:22200 const std::string& mime_type,
201 const GURL& original_url) {
jbroman73e9f7962014-10-30 00:43:45202 return nullptr;
lazyboyabce7812014-09-06 13:22:51203}
204
mathiash0cf256472014-10-06 10:44:16205std::string ContentRendererClient::GetUserAgentOverrideForURL(const GURL& url) {
206 return std::string();
207}
208
benwells04ab5b962015-05-06 08:29:40209scoped_ptr<blink::WebAppBannerClient>
210ContentRendererClient::CreateAppBannerClient(RenderFrame* render_frame) {
211 return nullptr;
212}
213
[email protected]22cf0092012-05-30 00:03:10214} // namespace content