OLD | NEW |
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 Loading... |
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" | |
47 #include "net/http/http_util.h" | 46 #include "net/http/http_util.h" |
48 #include "pdf/features.h" | 47 #include "pdf/features.h" |
49 #include "ppapi/features/features.h" | 48 #include "ppapi/features/features.h" |
50 #include "ui/base/l10n/l10n_util.h" | 49 #include "ui/base/l10n/l10n_util.h" |
51 #include "ui/base/layout.h" | 50 #include "ui/base/layout.h" |
52 #include "ui/base/resource/resource_bundle.h" | 51 #include "ui/base/resource/resource_bundle.h" |
53 #include "widevine_cdm_version.h" // In SHARED_INTERMEDIATE_DIR. | 52 #include "widevine_cdm_version.h" // In SHARED_INTERMEDIATE_DIR. |
54 | 53 |
55 #if defined(OS_LINUX) | 54 #if defined(OS_LINUX) |
56 #include <fcntl.h> | 55 #include <fcntl.h> |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
129 widevine_cdm_file_check = | 128 widevine_cdm_file_check = |
130 (base::PathExists(*adapter_path) && base::PathExists(*cdm_path)) | 129 (base::PathExists(*adapter_path) && base::PathExists(*cdm_path)) |
131 ? FOUND | 130 ? FOUND |
132 : NOT_FOUND; | 131 : NOT_FOUND; |
133 } | 132 } |
134 if (widevine_cdm_file_check == FOUND) { | 133 if (widevine_cdm_file_check == FOUND) { |
135 // 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. |
136 // 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. |
137 codecs_supported->push_back(kCdmSupportedCodecVp8); | 136 codecs_supported->push_back(kCdmSupportedCodecVp8); |
138 codecs_supported->push_back(kCdmSupportedCodecVp9); | 137 codecs_supported->push_back(kCdmSupportedCodecVp9); |
139 #if BUILDFLAG(USE_PROPRIETARY_CODECS) | 138 #if defined(USE_PROPRIETARY_CODECS) |
140 codecs_supported->push_back(kCdmSupportedCodecAvc1); | 139 codecs_supported->push_back(kCdmSupportedCodecAvc1); |
141 #endif // BUILDFLAG(USE_PROPRIETARY_CODECS) | 140 #endif // defined(USE_PROPRIETARY_CODECS) |
142 return true; | 141 return true; |
143 } | 142 } |
144 } | 143 } |
145 | 144 |
146 return false; | 145 return false; |
147 } | 146 } |
148 #endif // defined(WIDEVINE_CDM_AVAILABLE_NOT_COMPONENT) | 147 #endif // defined(WIDEVINE_CDM_AVAILABLE_NOT_COMPONENT) |
149 | 148 |
150 // 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 |
151 // 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 Loading... |
688 if (!origin_trial_policy_) | 687 if (!origin_trial_policy_) |
689 origin_trial_policy_ = base::MakeUnique<ChromeOriginTrialPolicy>(); | 688 origin_trial_policy_ = base::MakeUnique<ChromeOriginTrialPolicy>(); |
690 return origin_trial_policy_.get(); | 689 return origin_trial_policy_.get(); |
691 } | 690 } |
692 | 691 |
693 #if defined(OS_ANDROID) | 692 #if defined(OS_ANDROID) |
694 media::MediaClientAndroid* ChromeContentClient::GetMediaClientAndroid() { | 693 media::MediaClientAndroid* ChromeContentClient::GetMediaClientAndroid() { |
695 return new ChromeMediaClientAndroid(); | 694 return new ChromeMediaClientAndroid(); |
696 } | 695 } |
697 #endif // OS_ANDROID | 696 #endif // OS_ANDROID |
OLD | NEW |