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

Side by Side Diff: chrome/common/chrome_content_client.cc

Issue 2572883002: Convert USE_PROPRIETARY_CODECS to a buildflag header. (Closed)
Patch Set: Merge Created 4 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
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 <stdint.h> 7 #include <stdint.h>
8 8
9 #include <map> 9 #include <map>
10 #include <memory> 10 #include <memory>
(...skipping 25 matching lines...) Expand all
36 #include "components/dom_distiller/core/url_constants.h" 36 #include "components/dom_distiller/core/url_constants.h"
37 #include "components/version_info/version_info.h" 37 #include "components/version_info/version_info.h"
38 #include "content/public/common/cdm_info.h" 38 #include "content/public/common/cdm_info.h"
39 #include "content/public/common/content_constants.h" 39 #include "content/public/common/content_constants.h"
40 #include "content/public/common/content_switches.h" 40 #include "content/public/common/content_switches.h"
41 #include "content/public/common/url_constants.h" 41 #include "content/public/common/url_constants.h"
42 #include "content/public/common/user_agent.h" 42 #include "content/public/common/user_agent.h"
43 #include "extensions/common/constants.h" 43 #include "extensions/common/constants.h"
44 #include "extensions/features/features.h" 44 #include "extensions/features/features.h"
45 #include "gpu/config/gpu_info.h" 45 #include "gpu/config/gpu_info.h"
46 #include "media/media_features.h"
46 #include "net/http/http_util.h" 47 #include "net/http/http_util.h"
47 #include "pdf/features.h" 48 #include "pdf/features.h"
48 #include "ppapi/features/features.h" 49 #include "ppapi/features/features.h"
49 #include "ui/base/l10n/l10n_util.h" 50 #include "ui/base/l10n/l10n_util.h"
50 #include "ui/base/layout.h" 51 #include "ui/base/layout.h"
51 #include "ui/base/resource/resource_bundle.h" 52 #include "ui/base/resource/resource_bundle.h"
52 #include "widevine_cdm_version.h" // In SHARED_INTERMEDIATE_DIR. 53 #include "widevine_cdm_version.h" // In SHARED_INTERMEDIATE_DIR.
53 54
54 #if defined(OS_LINUX) 55 #if defined(OS_LINUX)
55 #include <fcntl.h> 56 #include <fcntl.h>
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 widevine_cdm_file_check = 129 widevine_cdm_file_check =
129 (base::PathExists(*adapter_path) && base::PathExists(*cdm_path)) 130 (base::PathExists(*adapter_path) && base::PathExists(*cdm_path))
130 ? FOUND 131 ? FOUND
131 : NOT_FOUND; 132 : NOT_FOUND;
132 } 133 }
133 if (widevine_cdm_file_check == FOUND) { 134 if (widevine_cdm_file_check == FOUND) {
134 // Add the supported codecs as if they came from the component manifest. 135 // Add the supported codecs as if they came from the component manifest.
135 // This list must match the CDM that is being bundled with Chrome. 136 // This list must match the CDM that is being bundled with Chrome.
136 codecs_supported->push_back(kCdmSupportedCodecVp8); 137 codecs_supported->push_back(kCdmSupportedCodecVp8);
137 codecs_supported->push_back(kCdmSupportedCodecVp9); 138 codecs_supported->push_back(kCdmSupportedCodecVp9);
138 #if defined(USE_PROPRIETARY_CODECS) 139 #if BUILDFLAG(USE_PROPRIETARY_CODECS)
139 codecs_supported->push_back(kCdmSupportedCodecAvc1); 140 codecs_supported->push_back(kCdmSupportedCodecAvc1);
140 #endif // defined(USE_PROPRIETARY_CODECS) 141 #endif // BUILDFLAG(USE_PROPRIETARY_CODECS)
141 return true; 142 return true;
142 } 143 }
143 } 144 }
144 145
145 return false; 146 return false;
146 } 147 }
147 #endif // defined(WIDEVINE_CDM_AVAILABLE_NOT_COMPONENT) 148 #endif // defined(WIDEVINE_CDM_AVAILABLE_NOT_COMPONENT)
148 149
149 // Appends the known built-in plugins to the given vector. Some built-in 150 // Appends the known built-in plugins to the given vector. Some built-in
150 // plugins are "internal" which means they are compiled into the Chrome binary, 151 // plugins are "internal" which means they are compiled into the Chrome binary,
(...skipping 536 matching lines...) Expand 10 before | Expand all | Expand 10 after
687 if (!origin_trial_policy_) 688 if (!origin_trial_policy_)
688 origin_trial_policy_ = base::MakeUnique<ChromeOriginTrialPolicy>(); 689 origin_trial_policy_ = base::MakeUnique<ChromeOriginTrialPolicy>();
689 return origin_trial_policy_.get(); 690 return origin_trial_policy_.get();
690 } 691 }
691 692
692 #if defined(OS_ANDROID) 693 #if defined(OS_ANDROID)
693 media::MediaClientAndroid* ChromeContentClient::GetMediaClientAndroid() { 694 media::MediaClientAndroid* ChromeContentClient::GetMediaClientAndroid() {
694 return new ChromeMediaClientAndroid(); 695 return new ChromeMediaClientAndroid();
695 } 696 }
696 #endif // OS_ANDROID 697 #endif // OS_ANDROID
OLDNEW
« no previous file with comments | « chrome/browser/media/encrypted_media_supported_types_browsertest.cc ('k') | chrome/renderer/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698