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

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

Issue 17198011: Wrap Pepper CDM Content Settings code in defined(ENABLE_PEPPER_CDMS). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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
« no previous file with comments | « chrome/browser/plugins/plugin_info_message_filter.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/logging.h" 8 #include "base/logging.h"
9 #include "base/metrics/histogram.h" 9 #include "base/metrics/histogram.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 bool ShouldUseJavaScriptSettingForPlugin(const WebPluginInfo& plugin) { 186 bool ShouldUseJavaScriptSettingForPlugin(const WebPluginInfo& plugin) {
187 if (plugin.type != WebPluginInfo::PLUGIN_TYPE_PEPPER_IN_PROCESS && 187 if (plugin.type != WebPluginInfo::PLUGIN_TYPE_PEPPER_IN_PROCESS &&
188 plugin.type != WebPluginInfo::PLUGIN_TYPE_PEPPER_OUT_OF_PROCESS) { 188 plugin.type != WebPluginInfo::PLUGIN_TYPE_PEPPER_OUT_OF_PROCESS) {
189 return false; 189 return false;
190 } 190 }
191 191
192 // Treat Native Client invocations like JavaScript. 192 // Treat Native Client invocations like JavaScript.
193 if (plugin.name == ASCIIToUTF16(chrome::ChromeContentClient::kNaClPluginName)) 193 if (plugin.name == ASCIIToUTF16(chrome::ChromeContentClient::kNaClPluginName))
194 return true; 194 return true;
195 195
196 #if defined(WIDEVINE_CDM_AVAILABLE) 196 #if defined(WIDEVINE_CDM_AVAILABLE) && defined(ENABLE_PEPPER_CDMS)
197 // Treat CDM invocations like JavaScript. 197 // Treat CDM invocations like JavaScript.
198 if (plugin.name == ASCIIToUTF16(kWidevineCdmDisplayName)) { 198 if (plugin.name == ASCIIToUTF16(kWidevineCdmDisplayName)) {
199 DCHECK(plugin.type == WebPluginInfo::PLUGIN_TYPE_PEPPER_OUT_OF_PROCESS); 199 DCHECK(plugin.type == WebPluginInfo::PLUGIN_TYPE_PEPPER_OUT_OF_PROCESS);
200 return true; 200 return true;
201 } 201 }
202 #endif // WIDEVINE_CDM_AVAILABLE 202 #endif // defined(WIDEVINE_CDM_AVAILABLE) && defined(ENABLE_PEPPER_CDMS)
203 203
204 return false; 204 return false;
205 } 205 }
206 206
207 #if defined(ENABLE_PLUGINS) 207 #if defined(ENABLE_PLUGINS)
208 const char* kPredefinedAllowedFileHandleOrigins[] = { 208 const char* kPredefinedAllowedFileHandleOrigins[] = {
209 "6EAED1924DB611B6EEF2A664BD077BE7EAD33B8F", // see crbug.com/234789 209 "6EAED1924DB611B6EEF2A664BD077BE7EAD33B8F", // see crbug.com/234789
210 }; 210 };
211 #endif 211 #endif
212 212
(...skipping 1063 matching lines...) Expand 10 before | Expand all | Expand 10 after
1276 if (CommandLine::ForCurrentProcess()->HasSwitch( 1276 if (CommandLine::ForCurrentProcess()->HasSwitch(
1277 switches::kEnablePepperTesting)) { 1277 switches::kEnablePepperTesting)) {
1278 return true; 1278 return true;
1279 } 1279 }
1280 #endif // !defined(OS_ANDROID) 1280 #endif // !defined(OS_ANDROID)
1281 return false; 1281 return false;
1282 } 1282 }
1283 1283
1284 1284
1285 } // namespace chrome 1285 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/plugins/plugin_info_message_filter.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698