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

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

Issue 1085393003: Remove code to register Pepper effects plugin (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 months 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 | « no previous file | chrome/common/chrome_paths.h » ('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/json/json_reader.h" 10 #include "base/json/json_reader.h"
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 namespace { 67 namespace {
68 68
69 #if defined(ENABLE_PLUGINS) 69 #if defined(ENABLE_PLUGINS)
70 const char kPDFPluginExtension[] = "pdf"; 70 const char kPDFPluginExtension[] = "pdf";
71 const char kPDFPluginDescription[] = "Portable Document Format"; 71 const char kPDFPluginDescription[] = "Portable Document Format";
72 const char kPDFPluginOutOfProcessMimeType[] = 72 const char kPDFPluginOutOfProcessMimeType[] =
73 "application/x-google-chrome-pdf"; 73 "application/x-google-chrome-pdf";
74 const uint32 kPDFPluginPermissions = ppapi::PERMISSION_PRIVATE | 74 const uint32 kPDFPluginPermissions = ppapi::PERMISSION_PRIVATE |
75 ppapi::PERMISSION_DEV; 75 ppapi::PERMISSION_DEV;
76 76
77 const char kEffectsPluginName[] = "Google Talk Effects Plugin";
78 const char kEffectsPluginMimeType[] ="application/x-ppapi-hangouts-effects";
79 const char kEffectsPluginExtension[] = "";
80 const char kEffectsPluginDescription[] = "Google Talk Effects Plugin";
81 const uint32 kEffectsPluginPermissions = ppapi::PERMISSION_PRIVATE |
82 ppapi::PERMISSION_DEV;
83
84 content::PepperPluginInfo::GetInterfaceFunc g_pdf_get_interface; 77 content::PepperPluginInfo::GetInterfaceFunc g_pdf_get_interface;
85 content::PepperPluginInfo::PPP_InitializeModuleFunc g_pdf_initialize_module; 78 content::PepperPluginInfo::PPP_InitializeModuleFunc g_pdf_initialize_module;
86 content::PepperPluginInfo::PPP_ShutdownModuleFunc g_pdf_shutdown_module; 79 content::PepperPluginInfo::PPP_ShutdownModuleFunc g_pdf_shutdown_module;
87 80
88 #if defined(ENABLE_REMOTING) 81 #if defined(ENABLE_REMOTING)
89 82
90 content::PepperPluginInfo::GetInterfaceFunc g_remoting_get_interface; 83 content::PepperPluginInfo::GetInterfaceFunc g_remoting_get_interface;
91 content::PepperPluginInfo::PPP_InitializeModuleFunc 84 content::PepperPluginInfo::PPP_InitializeModuleFunc
92 g_remoting_initialize_module; 85 g_remoting_initialize_module;
93 content::PepperPluginInfo::PPP_ShutdownModuleFunc g_remoting_shutdown_module; 86 content::PepperPluginInfo::PPP_ShutdownModuleFunc g_remoting_shutdown_module;
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 nacl::kPnaclPluginDescription); 156 nacl::kPnaclPluginDescription);
164 nacl.mime_types.push_back(pnacl_mime_type); 157 nacl.mime_types.push_back(pnacl_mime_type);
165 nacl.internal_entry_points.get_interface = g_nacl_get_interface; 158 nacl.internal_entry_points.get_interface = g_nacl_get_interface;
166 nacl.internal_entry_points.initialize_module = g_nacl_initialize_module; 159 nacl.internal_entry_points.initialize_module = g_nacl_initialize_module;
167 nacl.internal_entry_points.shutdown_module = g_nacl_shutdown_module; 160 nacl.internal_entry_points.shutdown_module = g_nacl_shutdown_module;
168 nacl.permissions = ppapi::PERMISSION_PRIVATE | ppapi::PERMISSION_DEV; 161 nacl.permissions = ppapi::PERMISSION_PRIVATE | ppapi::PERMISSION_DEV;
169 plugins->push_back(nacl); 162 plugins->push_back(nacl);
170 } 163 }
171 #endif // !defined(DISABLE_NACL) 164 #endif // !defined(DISABLE_NACL)
172 165
173 // TODO(vrk): Remove this when NaCl effects plugin replaces the ppapi effects
174 // plugin.
175 static bool skip_effects_file_check = false;
176 if (PathService::Get(chrome::FILE_EFFECTS_PLUGIN, &path)) {
177 if (skip_effects_file_check || base::PathExists(path)) {
178 content::PepperPluginInfo effects;
179 effects.path = path;
180 effects.name = kEffectsPluginName;
181 effects.is_out_of_process = true;
182 effects.permissions = kEffectsPluginPermissions;
183 content::WebPluginMimeType effects_mime_type(kEffectsPluginMimeType,
184 kEffectsPluginExtension,
185 kEffectsPluginDescription);
186 effects.mime_types.push_back(effects_mime_type);
187 plugins->push_back(effects);
188
189 skip_effects_file_check = true;
190 }
191 }
192
193 #if defined(WIDEVINE_CDM_AVAILABLE) && defined(ENABLE_PEPPER_CDMS) && \ 166 #if defined(WIDEVINE_CDM_AVAILABLE) && defined(ENABLE_PEPPER_CDMS) && \
194 !defined(WIDEVINE_CDM_IS_COMPONENT) 167 !defined(WIDEVINE_CDM_IS_COMPONENT)
195 static bool skip_widevine_cdm_file_check = false; 168 static bool skip_widevine_cdm_file_check = false;
196 if (PathService::Get(chrome::FILE_WIDEVINE_CDM_ADAPTER, &path)) { 169 if (PathService::Get(chrome::FILE_WIDEVINE_CDM_ADAPTER, &path)) {
197 if (skip_widevine_cdm_file_check || base::PathExists(path)) { 170 if (skip_widevine_cdm_file_check || base::PathExists(path)) {
198 content::PepperPluginInfo widevine_cdm; 171 content::PepperPluginInfo widevine_cdm;
199 widevine_cdm.is_out_of_process = true; 172 widevine_cdm.is_out_of_process = true;
200 widevine_cdm.path = path; 173 widevine_cdm.path = path;
201 widevine_cdm.name = kWidevineCdmDisplayName; 174 widevine_cdm.name = kWidevineCdmDisplayName;
202 widevine_cdm.description = kWidevineCdmDescription + 175 widevine_cdm.description = kWidevineCdmDescription +
(...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after
571 int sandbox_type, 544 int sandbox_type,
572 int* sandbox_profile_resource_id) const { 545 int* sandbox_profile_resource_id) const {
573 DCHECK(sandbox_profile_resource_id); 546 DCHECK(sandbox_profile_resource_id);
574 if (sandbox_type == NACL_SANDBOX_TYPE_NACL_LOADER) { 547 if (sandbox_type == NACL_SANDBOX_TYPE_NACL_LOADER) {
575 *sandbox_profile_resource_id = IDR_NACL_SANDBOX_PROFILE; 548 *sandbox_profile_resource_id = IDR_NACL_SANDBOX_PROFILE;
576 return true; 549 return true;
577 } 550 }
578 return false; 551 return false;
579 } 552 }
580 #endif 553 #endif
OLDNEW
« no previous file with comments | « no previous file | chrome/common/chrome_paths.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698