Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 547630 | Differences between
and this patch

Collapse All | Expand All

(-)chromium-old/chrome/common/chrome_content_client.cc (-2 / +27 lines)
Lines 111-116 Link Here
111
content::PepperPluginInfo::PPP_ShutdownModuleFunc g_nacl_shutdown_module;
111
content::PepperPluginInfo::PPP_ShutdownModuleFunc g_nacl_shutdown_module;
112
#endif
112
#endif
113
113
114
#if defined(WIDEVINE_CDM_AVAILABLE) && defined(ENABLE_PEPPER_CDMS) && \
115
    !defined(WIDEVINE_CDM_IS_COMPONENT)
116
const size_t kMaxWidevineCdmVersionFileLength = 32;
117
118
std::string ComputeWidevineVersionString() {
119
  base::FilePath path;
120
121
  if (PathService::Get(chrome::FILE_WIDEVINE_CDM_VERSION, &path)) {
122
    std::string version;
123
124
    ReadFileToString(path, &version, kMaxWidevineCdmVersionFileLength);
125
    if (!version.empty()) {
126
      size_t newline = version.find_first_of("\r\n");
127
      if (newline != std::string::npos)
128
        version.erase(newline);
129
130
      return version;
131
    }
132
  }
133
134
  return "<unknown version>";
135
}
136
#endif
137
114
// Appends the known built-in plugins to the given vector. Some built-in
138
// Appends the known built-in plugins to the given vector. Some built-in
115
// plugins are "internal" which means they are compiled into the Chrome binary,
139
// plugins are "internal" which means they are compiled into the Chrome binary,
116
// and some are extra shared libraries distributed with the browser (these are
140
// and some are extra shared libraries distributed with the browser (these are
Lines 169-182 Link Here
169
  static bool skip_widevine_cdm_file_check = false;
193
  static bool skip_widevine_cdm_file_check = false;
170
  if (PathService::Get(chrome::FILE_WIDEVINE_CDM_ADAPTER, &path)) {
194
  if (PathService::Get(chrome::FILE_WIDEVINE_CDM_ADAPTER, &path)) {
171
    if (skip_widevine_cdm_file_check || base::PathExists(path)) {
195
    if (skip_widevine_cdm_file_check || base::PathExists(path)) {
196
      std::string widevine_cdm_version_string = ComputeWidevineVersionString();
172
      content::PepperPluginInfo widevine_cdm;
197
      content::PepperPluginInfo widevine_cdm;
173
      widevine_cdm.is_out_of_process = true;
198
      widevine_cdm.is_out_of_process = true;
174
      widevine_cdm.path = path;
199
      widevine_cdm.path = path;
175
      widevine_cdm.name = kWidevineCdmDisplayName;
200
      widevine_cdm.name = kWidevineCdmDisplayName;
176
      widevine_cdm.description = kWidevineCdmDescription +
201
      widevine_cdm.description = kWidevineCdmDescription +
177
                                 std::string(" (version: ") +
202
                                 std::string(" (version: ") +
178
                                 WIDEVINE_CDM_VERSION_STRING + ")";
203
                                 widevine_cdm_version_string + ")";
179
      widevine_cdm.version = WIDEVINE_CDM_VERSION_STRING;
204
      widevine_cdm.version = widevine_cdm_version_string;
180
      content::WebPluginMimeType widevine_cdm_mime_type(
205
      content::WebPluginMimeType widevine_cdm_mime_type(
181
          kWidevineCdmPluginMimeType,
206
          kWidevineCdmPluginMimeType,
182
          kWidevineCdmPluginExtension,
207
          kWidevineCdmPluginExtension,
(-)chromium-old/chrome/common/chrome_paths.cc (+5 lines)
Lines 367-372 Link Here
367
        return false;
367
        return false;
368
      cur = cur.AppendASCII(kWidevineCdmAdapterFileName);
368
      cur = cur.AppendASCII(kWidevineCdmAdapterFileName);
369
      break;
369
      break;
370
    case chrome::FILE_WIDEVINE_CDM_VERSION:
371
      if (!GetInternalPluginsDirectory(&cur))
372
        return false;
373
      cur = cur.AppendASCII(kWidevineCdmVersionFileName);
374
      break;
370
#endif  // defined(WIDEVINE_CDM_AVAILABLE) && defined(ENABLE_PEPPER_CDMS)
375
#endif  // defined(WIDEVINE_CDM_AVAILABLE) && defined(ENABLE_PEPPER_CDMS)
371
    case chrome::FILE_RESOURCES_PACK:
376
    case chrome::FILE_RESOURCES_PACK:
372
#if defined(OS_MACOSX) && !defined(OS_IOS)
377
#if defined(OS_MACOSX) && !defined(OS_IOS)
(-)chromium-old/chrome/common/chrome_paths.h (+1 lines)
Lines 96-101 Link Here
96
  DIR_COMPONENT_WIDEVINE_CDM,   // Directory that contains component-updated
96
  DIR_COMPONENT_WIDEVINE_CDM,   // Directory that contains component-updated
97
                                // Widevine CDM files.
97
                                // Widevine CDM files.
98
  FILE_WIDEVINE_CDM_ADAPTER,    // Full path to the Widevine CDM adapter file.
98
  FILE_WIDEVINE_CDM_ADAPTER,    // Full path to the Widevine CDM adapter file.
99
  FILE_WIDEVINE_CDM_VERSION,    // Full path to the Widevine CDM version file.
99
  FILE_RESOURCES_PACK,          // Full path to the .pak file containing
100
  FILE_RESOURCES_PACK,          // Full path to the .pak file containing
100
                                // binary data (e.g., html files and images
101
                                // binary data (e.g., html files and images
101
                                // used by internal pages).
102
                                // used by internal pages).
(-)chromium-old/third_party/widevine/cdm/widevine_cdm_common.h (+2 lines)
Lines 46-51 Link Here
46
    "libwidevinecdmadapter.so";
46
    "libwidevinecdmadapter.so";
47
#endif
47
#endif
48
48
49
const char kWidevineCdmVersionFileName[] = "widevine.version";
50
49
// The following strings are used to communicate supported codecs (from the
51
// The following strings are used to communicate supported codecs (from the
50
// component manifest) via WebPluginInfo::WebPluginMimeType's additional params.
52
// component manifest) via WebPluginInfo::WebPluginMimeType's additional params.
51
const char kCdmSupportedCodecsParamName[] = "codecs";
53
const char kCdmSupportedCodecsParamName[] = "codecs";

Return to bug 547630