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

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

Issue 374773002: Remove GTalk/O1D plugins and related code (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/ui/webui/plugins_ui.cc ('k') | 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 kO1DPluginName[] = "Google Talk Plugin Video Renderer";
78 const char kO1DPluginMimeType[] ="application/o1d";
79 const char kO1DPluginExtension[] = "";
80 const char kO1DPluginDescription[] = "Google Talk Plugin Video Renderer";
81 const uint32 kO1DPluginPermissions = ppapi::PERMISSION_PRIVATE |
82 ppapi::PERMISSION_DEV;
83
84 const char kEffectsPluginName[] = "Google Talk Effects Plugin"; 77 const char kEffectsPluginName[] = "Google Talk Effects Plugin";
85 const char kEffectsPluginMimeType[] ="application/x-ppapi-hangouts-effects"; 78 const char kEffectsPluginMimeType[] ="application/x-ppapi-hangouts-effects";
86 const char kEffectsPluginExtension[] = ""; 79 const char kEffectsPluginExtension[] = "";
87 const char kEffectsPluginDescription[] = "Google Talk Effects Plugin"; 80 const char kEffectsPluginDescription[] = "Google Talk Effects Plugin";
88 const uint32 kEffectsPluginPermissions = ppapi::PERMISSION_PRIVATE | 81 const uint32 kEffectsPluginPermissions = ppapi::PERMISSION_PRIVATE |
89 ppapi::PERMISSION_DEV; 82 ppapi::PERMISSION_DEV;
90 83
91 const char kGTalkPluginName[] = "Google Talk Plugin";
92 const char kGTalkPluginMimeType[] ="application/googletalk";
93 const char kGTalkPluginExtension[] = ".googletalk";
94 const char kGTalkPluginDescription[] = "Google Talk Plugin";
95 const uint32 kGTalkPluginPermissions = ppapi::PERMISSION_PRIVATE |
96 ppapi::PERMISSION_DEV;
97
98 content::PepperPluginInfo::GetInterfaceFunc g_pdf_get_interface; 84 content::PepperPluginInfo::GetInterfaceFunc g_pdf_get_interface;
99 content::PepperPluginInfo::PPP_InitializeModuleFunc g_pdf_initialize_module; 85 content::PepperPluginInfo::PPP_InitializeModuleFunc g_pdf_initialize_module;
100 content::PepperPluginInfo::PPP_ShutdownModuleFunc g_pdf_shutdown_module; 86 content::PepperPluginInfo::PPP_ShutdownModuleFunc g_pdf_shutdown_module;
101 87
102 #if defined(ENABLE_REMOTING) 88 #if defined(ENABLE_REMOTING)
103 89
104 content::PepperPluginInfo::GetInterfaceFunc g_remoting_get_interface; 90 content::PepperPluginInfo::GetInterfaceFunc g_remoting_get_interface;
105 content::PepperPluginInfo::PPP_InitializeModuleFunc 91 content::PepperPluginInfo::PPP_InitializeModuleFunc
106 g_remoting_initialize_module; 92 g_remoting_initialize_module;
107 content::PepperPluginInfo::PPP_ShutdownModuleFunc g_remoting_shutdown_module; 93 content::PepperPluginInfo::PPP_ShutdownModuleFunc g_remoting_shutdown_module;
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 nacl::kPnaclPluginDescription); 163 nacl::kPnaclPluginDescription);
178 nacl.mime_types.push_back(pnacl_mime_type); 164 nacl.mime_types.push_back(pnacl_mime_type);
179 nacl.internal_entry_points.get_interface = g_nacl_get_interface; 165 nacl.internal_entry_points.get_interface = g_nacl_get_interface;
180 nacl.internal_entry_points.initialize_module = g_nacl_initialize_module; 166 nacl.internal_entry_points.initialize_module = g_nacl_initialize_module;
181 nacl.internal_entry_points.shutdown_module = g_nacl_shutdown_module; 167 nacl.internal_entry_points.shutdown_module = g_nacl_shutdown_module;
182 nacl.permissions = ppapi::PERMISSION_PRIVATE | ppapi::PERMISSION_DEV; 168 nacl.permissions = ppapi::PERMISSION_PRIVATE | ppapi::PERMISSION_DEV;
183 plugins->push_back(nacl); 169 plugins->push_back(nacl);
184 } 170 }
185 #endif // !defined(DISABLE_NACL) 171 #endif // !defined(DISABLE_NACL)
186 172
187 static bool skip_o1d_file_check = false;
188 if (PathService::Get(chrome::FILE_O1D_PLUGIN, &path)) {
189 if (skip_o1d_file_check || base::PathExists(path)) {
190 content::PepperPluginInfo o1d;
191 o1d.path = path;
192 o1d.name = kO1DPluginName;
193 o1d.is_out_of_process = true;
194 o1d.is_sandboxed = false;
195 o1d.permissions = kO1DPluginPermissions;
196 content::WebPluginMimeType o1d_mime_type(kO1DPluginMimeType,
197 kO1DPluginExtension,
198 kO1DPluginDescription);
199 o1d.mime_types.push_back(o1d_mime_type);
200 plugins->push_back(o1d);
201
202 skip_o1d_file_check = true;
203 }
204 }
205
206 // TODO(vrk): Remove this when NaCl effects plugin replaces the ppapi effects 173 // TODO(vrk): Remove this when NaCl effects plugin replaces the ppapi effects
207 // plugin. 174 // plugin.
208 static bool skip_effects_file_check = false; 175 static bool skip_effects_file_check = false;
209 if (PathService::Get(chrome::FILE_EFFECTS_PLUGIN, &path)) { 176 if (PathService::Get(chrome::FILE_EFFECTS_PLUGIN, &path)) {
210 if (skip_effects_file_check || base::PathExists(path)) { 177 if (skip_effects_file_check || base::PathExists(path)) {
211 content::PepperPluginInfo effects; 178 content::PepperPluginInfo effects;
212 effects.path = path; 179 effects.path = path;
213 effects.name = kEffectsPluginName; 180 effects.name = kEffectsPluginName;
214 effects.is_out_of_process = true; 181 effects.is_out_of_process = true;
215 effects.is_sandboxed = true;
216 effects.permissions = kEffectsPluginPermissions; 182 effects.permissions = kEffectsPluginPermissions;
217 content::WebPluginMimeType effects_mime_type(kEffectsPluginMimeType, 183 content::WebPluginMimeType effects_mime_type(kEffectsPluginMimeType,
218 kEffectsPluginExtension, 184 kEffectsPluginExtension,
219 kEffectsPluginDescription); 185 kEffectsPluginDescription);
220 effects.mime_types.push_back(effects_mime_type); 186 effects.mime_types.push_back(effects_mime_type);
221 plugins->push_back(effects); 187 plugins->push_back(effects);
222 188
223 skip_effects_file_check = true; 189 skip_effects_file_check = true;
224 } 190 }
225 } 191 }
226 192
227 static bool skip_gtalk_file_check = false;
228 if (PathService::Get(chrome::FILE_GTALK_PLUGIN, &path)) {
229 if (skip_gtalk_file_check || base::PathExists(path)) {
230 content::PepperPluginInfo gtalk;
231 gtalk.path = path;
232 gtalk.name = kGTalkPluginName;
233 gtalk.is_out_of_process = true;
234 gtalk.is_sandboxed = false;
235 gtalk.permissions = kGTalkPluginPermissions;
236 content::WebPluginMimeType gtalk_mime_type(kGTalkPluginMimeType,
237 kGTalkPluginExtension,
238 kGTalkPluginDescription);
239 gtalk.mime_types.push_back(gtalk_mime_type);
240 plugins->push_back(gtalk);
241
242 skip_gtalk_file_check = true;
243 }
244 }
245
246 #if defined(WIDEVINE_CDM_AVAILABLE) && defined(ENABLE_PEPPER_CDMS) && \ 193 #if defined(WIDEVINE_CDM_AVAILABLE) && defined(ENABLE_PEPPER_CDMS) && \
247 !defined(WIDEVINE_CDM_IS_COMPONENT) 194 !defined(WIDEVINE_CDM_IS_COMPONENT)
248 static bool skip_widevine_cdm_file_check = false; 195 static bool skip_widevine_cdm_file_check = false;
249 if (PathService::Get(chrome::FILE_WIDEVINE_CDM_ADAPTER, &path)) { 196 if (PathService::Get(chrome::FILE_WIDEVINE_CDM_ADAPTER, &path)) {
250 if (skip_widevine_cdm_file_check || base::PathExists(path)) { 197 if (skip_widevine_cdm_file_check || base::PathExists(path)) {
251 content::PepperPluginInfo widevine_cdm; 198 content::PepperPluginInfo widevine_cdm;
252 widevine_cdm.is_out_of_process = true; 199 widevine_cdm.is_out_of_process = true;
253 widevine_cdm.path = path; 200 widevine_cdm.path = path;
254 widevine_cdm.name = kWidevineCdmDisplayName; 201 widevine_cdm.name = kWidevineCdmDisplayName;
255 widevine_cdm.description = kWidevineCdmDescription + 202 widevine_cdm.description = kWidevineCdmDescription +
(...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after
624 int sandbox_type, 571 int sandbox_type,
625 int* sandbox_profile_resource_id) const { 572 int* sandbox_profile_resource_id) const {
626 DCHECK(sandbox_profile_resource_id); 573 DCHECK(sandbox_profile_resource_id);
627 if (sandbox_type == NACL_SANDBOX_TYPE_NACL_LOADER) { 574 if (sandbox_type == NACL_SANDBOX_TYPE_NACL_LOADER) {
628 *sandbox_profile_resource_id = IDR_NACL_SANDBOX_PROFILE; 575 *sandbox_profile_resource_id = IDR_NACL_SANDBOX_PROFILE;
629 return true; 576 return true;
630 } 577 }
631 return false; 578 return false;
632 } 579 }
633 #endif 580 #endif
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/plugins_ui.cc ('k') | chrome/common/chrome_paths.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698