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

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

Issue 2572883002: Convert USE_PROPRIETARY_CODECS to a buildflag header. (Closed)
Patch Set: 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 "ppapi/features/features.h" 48 #include "ppapi/features/features.h"
48 #include "ui/base/l10n/l10n_util.h" 49 #include "ui/base/l10n/l10n_util.h"
49 #include "ui/base/layout.h" 50 #include "ui/base/layout.h"
50 #include "ui/base/resource/resource_bundle.h" 51 #include "ui/base/resource/resource_bundle.h"
51 #include "widevine_cdm_version.h" // In SHARED_INTERMEDIATE_DIR. 52 #include "widevine_cdm_version.h" // In SHARED_INTERMEDIATE_DIR.
52 53
53 #if defined(OS_LINUX) 54 #if defined(OS_LINUX)
54 #include <fcntl.h> 55 #include <fcntl.h>
55 #include "chrome/common/component_flash_hint_file_linux.h" 56 #include "chrome/common/component_flash_hint_file_linux.h"
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 widevine_cdm_file_check = 128 widevine_cdm_file_check =
128 (base::PathExists(*adapter_path) && base::PathExists(*cdm_path)) 129 (base::PathExists(*adapter_path) && base::PathExists(*cdm_path))
129 ? FOUND 130 ? FOUND
130 : NOT_FOUND; 131 : NOT_FOUND;
131 } 132 }
132 if (widevine_cdm_file_check == FOUND) { 133 if (widevine_cdm_file_check == FOUND) {
133 // Add the supported codecs as if they came from the component manifest. 134 // Add the supported codecs as if they came from the component manifest.
134 // This list must match the CDM that is being bundled with Chrome. 135 // This list must match the CDM that is being bundled with Chrome.
135 codecs_supported->push_back(kCdmSupportedCodecVp8); 136 codecs_supported->push_back(kCdmSupportedCodecVp8);
136 codecs_supported->push_back(kCdmSupportedCodecVp9); 137 codecs_supported->push_back(kCdmSupportedCodecVp9);
137 #if defined(USE_PROPRIETARY_CODECS) 138 #if BUILDFLAG(USE_PROPRIETARY_CODECS)
138 codecs_supported->push_back(kCdmSupportedCodecAvc1); 139 codecs_supported->push_back(kCdmSupportedCodecAvc1);
139 #endif // defined(USE_PROPRIETARY_CODECS) 140 #endif // BUILDFLAG(USE_PROPRIETARY_CODECS)
140 return true; 141 return true;
141 } 142 }
142 } 143 }
143 144
144 return false; 145 return false;
145 } 146 }
146 #endif // defined(WIDEVINE_CDM_AVAILABLE_NOT_COMPONENT) 147 #endif // defined(WIDEVINE_CDM_AVAILABLE_NOT_COMPONENT)
147 148
148 // Appends the known built-in plugins to the given vector. Some built-in 149 // Appends the known built-in plugins to the given vector. Some built-in
149 // plugins are "internal" which means they are compiled into the Chrome binary, 150 // plugins are "internal" which means they are compiled into the Chrome binary,
(...skipping 536 matching lines...) Expand 10 before | Expand all | Expand 10 after
686 if (!origin_trial_policy_) 687 if (!origin_trial_policy_)
687 origin_trial_policy_ = base::MakeUnique<ChromeOriginTrialPolicy>(); 688 origin_trial_policy_ = base::MakeUnique<ChromeOriginTrialPolicy>();
688 return origin_trial_policy_.get(); 689 return origin_trial_policy_.get();
689 } 690 }
690 691
691 #if defined(OS_ANDROID) 692 #if defined(OS_ANDROID)
692 media::MediaClientAndroid* ChromeContentClient::GetMediaClientAndroid() { 693 media::MediaClientAndroid* ChromeContentClient::GetMediaClientAndroid() {
693 return new ChromeMediaClientAndroid(); 694 return new ChromeMediaClientAndroid();
694 } 695 }
695 #endif // OS_ANDROID 696 #endif // OS_ANDROID
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698