Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(136)

Side by Side Diff: chrome/renderer/chrome_content_renderer_client.cc

Issue 23513055: Populate canPlayType to renderer (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: moving ipc to chrome/common/ Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 #include "chrome/renderer/chrome_content_renderer_client.h" 5 #include "chrome/renderer/chrome_content_renderer_client.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/debug/crash_logging.h" 8 #include "base/debug/crash_logging.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 101
102 #if defined(ENABLE_WEBRTC) 102 #if defined(ENABLE_WEBRTC)
103 #include "chrome/renderer/media/webrtc_logging_message_filter.h" 103 #include "chrome/renderer/media/webrtc_logging_message_filter.h"
104 #endif 104 #endif
105 105
106 #if defined(ENABLE_SPELLCHECK) 106 #if defined(ENABLE_SPELLCHECK)
107 #include "chrome/renderer/spellchecker/spellcheck.h" 107 #include "chrome/renderer/spellchecker/spellcheck.h"
108 #include "chrome/renderer/spellchecker/spellcheck_provider.h" 108 #include "chrome/renderer/spellchecker/spellcheck_provider.h"
109 #endif 109 #endif
110 110
111 #if defined(OS_ANDROID)
112 #include "chrome/common/encrypted_media_messages_android.h"
113 #include "chrome/renderer/media/encrypted_media_utils_android.h"
114 #endif
115
111 using autofill::AutofillAgent; 116 using autofill::AutofillAgent;
112 using autofill::PasswordAutofillAgent; 117 using autofill::PasswordAutofillAgent;
113 using autofill::PasswordGenerationManager; 118 using autofill::PasswordGenerationManager;
114 using content::RenderThread; 119 using content::RenderThread;
115 using content::WebPluginInfo; 120 using content::WebPluginInfo;
116 using extensions::Extension; 121 using extensions::Extension;
117 using WebKit::WebCache; 122 using WebKit::WebCache;
118 using WebKit::WebConsoleMessage; 123 using WebKit::WebConsoleMessage;
119 using WebKit::WebDataSource; 124 using WebKit::WebDataSource;
120 using WebKit::WebDocument; 125 using WebKit::WebDocument;
(...skipping 1179 matching lines...) Expand 10 before | Expand all | Expand 10 after
1300 } 1305 }
1301 #endif // !defined(OS_ANDROID) 1306 #endif // !defined(OS_ANDROID)
1302 return false; 1307 return false;
1303 } 1308 }
1304 1309
1305 void ChromeContentRendererClient::AddKeySystems( 1310 void ChromeContentRendererClient::AddKeySystems(
1306 std::vector<content::KeySystemInfo>* key_systems) { 1311 std::vector<content::KeySystemInfo>* key_systems) {
1307 // TODO(ddorwin): In the next CL, move code from 1312 // TODO(ddorwin): In the next CL, move code from
1308 // content/renderer/media/crypto/key_systems_info.cc to chrome_key_systems.cc 1313 // content/renderer/media/crypto/key_systems_info.cc to chrome_key_systems.cc
1309 // and call AddKeySystems. 1314 // and call AddKeySystems.
1315 #if defined(OS_ANDROID)
1316 std::vector<SupportedKeySystem> supported_systems;
1317 RenderThread::Get()->GetChannel()->Send(
ddorwin 2013/09/16 17:58:10 Note: I used content::RenderThread::Get()->Send(),
qinmin 2013/09/17 19:21:06 ok, make it consistent with ur CL. On 2013/09/16 1
jam 2013/09/17 20:26:02 RenderThread::Get()->Send is enough regarding rou
qinmin 2013/09/17 21:26:23 This is moved to chrome_key_systems.cc, and using
1318 new ChromeViewHostMsg_GetSupportedKeySystems(
1319 MSG_ROUTING_NONE, &supported_systems));
1320 for (unsigned i = 0; i < supported_systems.size(); ++i) {
ddorwin 2013/09/16 17:58:10 size_t
qinmin 2013/09/17 19:21:06 Done.
1321 key_systems->push_back(
1322 SupportedKeySystemToKeySystemInfo(supported_systems[i]));
ddorwin 2013/09/16 17:58:10 See ToT and https://codereview.chromium.org/238280
qinmin 2013/09/17 21:26:23 Done.
1323 }
1324 #endif // defined(OS_ANDROID)
1310 } 1325 }
1311 1326
1312 bool ChromeContentRendererClient::ShouldReportDetailedMessageForSource( 1327 bool ChromeContentRendererClient::ShouldReportDetailedMessageForSource(
1313 const base::string16& source) const { 1328 const base::string16& source) const {
1314 return extensions::IsSourceFromAnExtension(source); 1329 return extensions::IsSourceFromAnExtension(source);
1315 } 1330 }
1316 1331
1317 bool ChromeContentRendererClient::ShouldEnableSiteIsolationPolicy() const { 1332 bool ChromeContentRendererClient::ShouldEnableSiteIsolationPolicy() const {
1318 // SiteIsolationPolicy is off by default. We would like to activate cross-site 1333 // SiteIsolationPolicy is off by default. We would like to activate cross-site
1319 // document blocking (for UMA data collection) for normal renderer processes 1334 // document blocking (for UMA data collection) for normal renderer processes
1320 // running a normal web page from the Internet. We only turn on 1335 // running a normal web page from the Internet. We only turn on
1321 // SiteIsolationPolicy for a renderer process that does not have the extension 1336 // SiteIsolationPolicy for a renderer process that does not have the extension
1322 // flag on. 1337 // flag on.
1323 CommandLine* command_line = CommandLine::ForCurrentProcess(); 1338 CommandLine* command_line = CommandLine::ForCurrentProcess();
1324 return !command_line->HasSwitch(switches::kExtensionProcess); 1339 return !command_line->HasSwitch(switches::kExtensionProcess);
1325 } 1340 }
1326 1341
1327 } // namespace chrome 1342 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698