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

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

Issue 772043004: Replace WIDEVINE_CDM_AVAILABLE with a gyp define 'enable_widevine_cdm'. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix #endif Created 6 years 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
« no previous file with comments | « chrome/common/chrome_paths.cc ('k') | chrome/renderer/media/chrome_key_systems.cc » ('j') | 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/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/field_trial.h" 10 #include "base/metrics/field_trial.h"
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 plugin.type != WebPluginInfo::PLUGIN_TYPE_PEPPER_OUT_OF_PROCESS) { 238 plugin.type != WebPluginInfo::PLUGIN_TYPE_PEPPER_OUT_OF_PROCESS) {
239 return false; 239 return false;
240 } 240 }
241 241
242 #if !defined(DISABLE_NACL) 242 #if !defined(DISABLE_NACL)
243 // Treat Native Client invocations like JavaScript. 243 // Treat Native Client invocations like JavaScript.
244 if (plugin.name == ASCIIToUTF16(nacl::kNaClPluginName)) 244 if (plugin.name == ASCIIToUTF16(nacl::kNaClPluginName))
245 return true; 245 return true;
246 #endif 246 #endif
247 247
248 #if defined(WIDEVINE_CDM_AVAILABLE) && defined(ENABLE_PEPPER_CDMS) 248 #if defined(ENABLE_WIDEVINE_CDM) && defined(ENABLE_PEPPER_CDMS)
249 // Treat CDM invocations like JavaScript. 249 // Treat CDM invocations like JavaScript.
250 if (plugin.name == ASCIIToUTF16(kWidevineCdmDisplayName)) { 250 if (plugin.name == ASCIIToUTF16(kWidevineCdmDisplayName)) {
251 DCHECK(plugin.type == WebPluginInfo::PLUGIN_TYPE_PEPPER_OUT_OF_PROCESS); 251 DCHECK(plugin.type == WebPluginInfo::PLUGIN_TYPE_PEPPER_OUT_OF_PROCESS);
252 return true; 252 return true;
253 } 253 }
254 #endif // defined(WIDEVINE_CDM_AVAILABLE) && defined(ENABLE_PEPPER_CDMS) 254 #endif // defined(ENABLE_WIDEVINE_CDM) && defined(ENABLE_PEPPER_CDMS)
255 255
256 return false; 256 return false;
257 } 257 }
258 258
259 #if defined(ENABLE_EXTENSIONS) 259 #if defined(ENABLE_EXTENSIONS)
260 void IsGuestViewApiAvailableToScriptContext( 260 void IsGuestViewApiAvailableToScriptContext(
261 bool* api_is_available, 261 bool* api_is_available,
262 extensions::ScriptContext* context) { 262 extensions::ScriptContext* context) {
263 if (context->GetAvailability("guestViewInternal").is_available()) { 263 if (context->GetAvailability("guestViewInternal").is_available()) {
264 *api_is_available = true; 264 *api_is_available = true;
(...skipping 1305 matching lines...) Expand 10 before | Expand all | Expand 10 after
1570 if (mime_type == content::kBrowserPluginMimeType) { 1570 if (mime_type == content::kBrowserPluginMimeType) {
1571 return new extensions::ExtensionsGuestViewContainer(render_frame); 1571 return new extensions::ExtensionsGuestViewContainer(render_frame);
1572 } else { 1572 } else {
1573 return new extensions::MimeHandlerViewContainer( 1573 return new extensions::MimeHandlerViewContainer(
1574 render_frame, mime_type, original_url); 1574 render_frame, mime_type, original_url);
1575 } 1575 }
1576 #else 1576 #else
1577 return NULL; 1577 return NULL;
1578 #endif 1578 #endif
1579 } 1579 }
OLDNEW
« no previous file with comments | « chrome/common/chrome_paths.cc ('k') | chrome/renderer/media/chrome_key_systems.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698