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

Side by Side Diff: chrome/common/chrome_content_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/browser/plugins/plugin_info_message_filter.cc ('k') | chrome/common/chrome_paths.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/common/chrome_content_client.h" 5 #include "chrome/common/chrome_content_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/files/file_util.h" 9 #include "base/files/file_util.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 #include "chrome/common/pepper_flash.h" 54 #include "chrome/common/pepper_flash.h"
55 #include "content/public/common/pepper_plugin_info.h" 55 #include "content/public/common/pepper_plugin_info.h"
56 #include "flapper_version.h" // In SHARED_INTERMEDIATE_DIR. 56 #include "flapper_version.h" // In SHARED_INTERMEDIATE_DIR.
57 #include "ppapi/shared_impl/ppapi_permissions.h" 57 #include "ppapi/shared_impl/ppapi_permissions.h"
58 #endif 58 #endif
59 59
60 #if defined(ENABLE_REMOTING) 60 #if defined(ENABLE_REMOTING)
61 #include "remoting/client/plugin/pepper_entrypoints.h" 61 #include "remoting/client/plugin/pepper_entrypoints.h"
62 #endif 62 #endif
63 63
64 #if defined(WIDEVINE_CDM_AVAILABLE) && defined(ENABLE_PEPPER_CDMS) && \ 64 #if defined(ENABLE_WIDEVINE_CDM) && defined(ENABLE_PEPPER_CDMS) && \
65 !defined(WIDEVINE_CDM_IS_COMPONENT) 65 !defined(WIDEVINE_CDM_IS_COMPONENT)
66 #include "chrome/common/widevine_cdm_constants.h" 66 #include "chrome/common/widevine_cdm_constants.h"
67 #endif 67 #endif
68 68
69 namespace { 69 namespace {
70 70
71 #if defined(ENABLE_PLUGINS) 71 #if defined(ENABLE_PLUGINS)
72 const char kPDFPluginMimeType[] = "application/pdf"; 72 const char kPDFPluginMimeType[] = "application/pdf";
73 const char kPDFPluginExtension[] = "pdf"; 73 const char kPDFPluginExtension[] = "pdf";
74 const char kPDFPluginDescription[] = "Portable Document Format"; 74 const char kPDFPluginDescription[] = "Portable Document Format";
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 content::WebPluginMimeType gtalk_mime_type(kGTalkPluginMimeType, 245 content::WebPluginMimeType gtalk_mime_type(kGTalkPluginMimeType,
246 kGTalkPluginExtension, 246 kGTalkPluginExtension,
247 kGTalkPluginDescription); 247 kGTalkPluginDescription);
248 gtalk.mime_types.push_back(gtalk_mime_type); 248 gtalk.mime_types.push_back(gtalk_mime_type);
249 plugins->push_back(gtalk); 249 plugins->push_back(gtalk);
250 250
251 skip_gtalk_file_check = true; 251 skip_gtalk_file_check = true;
252 } 252 }
253 } 253 }
254 254
255 #if defined(WIDEVINE_CDM_AVAILABLE) && defined(ENABLE_PEPPER_CDMS) && \ 255 #if defined(ENABLE_WIDEVINE_CDM) && defined(ENABLE_PEPPER_CDMS) && \
256 !defined(WIDEVINE_CDM_IS_COMPONENT) 256 !defined(WIDEVINE_CDM_IS_COMPONENT)
257 static bool skip_widevine_cdm_file_check = false; 257 static bool skip_widevine_cdm_file_check = false;
258 if (PathService::Get(chrome::FILE_WIDEVINE_CDM_ADAPTER, &path)) { 258 if (PathService::Get(chrome::FILE_WIDEVINE_CDM_ADAPTER, &path)) {
259 if (skip_widevine_cdm_file_check || base::PathExists(path)) { 259 if (skip_widevine_cdm_file_check || base::PathExists(path)) {
260 content::PepperPluginInfo widevine_cdm; 260 content::PepperPluginInfo widevine_cdm;
261 widevine_cdm.is_out_of_process = true; 261 widevine_cdm.is_out_of_process = true;
262 widevine_cdm.path = path; 262 widevine_cdm.path = path;
263 widevine_cdm.name = kWidevineCdmDisplayName; 263 widevine_cdm.name = kWidevineCdmDisplayName;
264 widevine_cdm.description = kWidevineCdmDescription + 264 widevine_cdm.description = kWidevineCdmDescription +
265 std::string(" (version: ") + 265 std::string(" (version: ") +
(...skipping 20 matching lines...) Expand all
286 widevine_cdm_mime_type.additional_param_values.push_back( 286 widevine_cdm_mime_type.additional_param_values.push_back(
287 base::ASCIIToUTF16(codec_string)); 287 base::ASCIIToUTF16(codec_string));
288 288
289 widevine_cdm.mime_types.push_back(widevine_cdm_mime_type); 289 widevine_cdm.mime_types.push_back(widevine_cdm_mime_type);
290 widevine_cdm.permissions = kWidevineCdmPluginPermissions; 290 widevine_cdm.permissions = kWidevineCdmPluginPermissions;
291 plugins->push_back(widevine_cdm); 291 plugins->push_back(widevine_cdm);
292 292
293 skip_widevine_cdm_file_check = true; 293 skip_widevine_cdm_file_check = true;
294 } 294 }
295 } 295 }
296 #endif // defined(WIDEVINE_CDM_AVAILABLE) && defined(ENABLE_PEPPER_CDMS) && 296 #endif // defined(ENABLE_WIDEVINE_CDM) && defined(ENABLE_PEPPER_CDMS) &&
297 // !defined(WIDEVINE_CDM_IS_COMPONENT) 297 // !defined(WIDEVINE_CDM_IS_COMPONENT)
298 298
299 // The Remoting Viewer plugin is built-in. 299 // The Remoting Viewer plugin is built-in.
300 #if defined(ENABLE_REMOTING) 300 #if defined(ENABLE_REMOTING)
301 content::PepperPluginInfo info; 301 content::PepperPluginInfo info;
302 info.is_internal = true; 302 info.is_internal = true;
303 info.is_out_of_process = true; 303 info.is_out_of_process = true;
304 info.name = kRemotingViewerPluginName; 304 info.name = kRemotingViewerPluginName;
305 info.description = kRemotingViewerPluginDescription; 305 info.description = kRemotingViewerPluginDescription;
306 info.path = base::FilePath::FromUTF8Unsafe( 306 info.path = base::FilePath::FromUTF8Unsafe(
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
528 int sandbox_type, 528 int sandbox_type,
529 int* sandbox_profile_resource_id) const { 529 int* sandbox_profile_resource_id) const {
530 DCHECK(sandbox_profile_resource_id); 530 DCHECK(sandbox_profile_resource_id);
531 if (sandbox_type == NACL_SANDBOX_TYPE_NACL_LOADER) { 531 if (sandbox_type == NACL_SANDBOX_TYPE_NACL_LOADER) {
532 *sandbox_profile_resource_id = IDR_NACL_SANDBOX_PROFILE; 532 *sandbox_profile_resource_id = IDR_NACL_SANDBOX_PROFILE;
533 return true; 533 return true;
534 } 534 }
535 return false; 535 return false;
536 } 536 }
537 #endif 537 #endif
OLDNEW
« no previous file with comments | « chrome/browser/plugins/plugin_info_message_filter.cc ('k') | chrome/common/chrome_paths.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698