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

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

Issue 139733002: Don't load PPAPI O3D. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 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 | « 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/cpu.h" 8 #include "base/cpu.h"
9 #include "base/debug/crash_logging.h" 9 #include "base/debug/crash_logging.h"
10 #include "base/file_util.h" 10 #include "base/file_util.h"
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 const char kNaClPluginMimeType[] = "application/x-nacl"; 72 const char kNaClPluginMimeType[] = "application/x-nacl";
73 const char kNaClPluginExtension[] = ""; 73 const char kNaClPluginExtension[] = "";
74 const char kNaClPluginDescription[] = "Native Client Executable"; 74 const char kNaClPluginDescription[] = "Native Client Executable";
75 const uint32 kNaClPluginPermissions = ppapi::PERMISSION_PRIVATE | 75 const uint32 kNaClPluginPermissions = ppapi::PERMISSION_PRIVATE |
76 ppapi::PERMISSION_DEV; 76 ppapi::PERMISSION_DEV;
77 77
78 const char kPnaclPluginMimeType[] = "application/x-pnacl"; 78 const char kPnaclPluginMimeType[] = "application/x-pnacl";
79 const char kPnaclPluginExtension[] = ""; 79 const char kPnaclPluginExtension[] = "";
80 const char kPnaclPluginDescription[] = "Portable Native Client Executable"; 80 const char kPnaclPluginDescription[] = "Portable Native Client Executable";
81 81
82 const char kO3DPluginName[] = "Google Talk Plugin Video Accelerator";
83 const char kO3DPluginMimeType[] ="application/vnd.o3d.auto";
84 const char kO3DPluginExtension[] = "";
85 const char kO3DPluginDescription[] = "O3D MIME";
86 const uint32 kO3DPluginPermissions = ppapi::PERMISSION_PRIVATE |
87 ppapi::PERMISSION_DEV;
88
89 const char kO1DPluginName[] = "Google Talk Plugin Video Renderer"; 82 const char kO1DPluginName[] = "Google Talk Plugin Video Renderer";
90 const char kO1DPluginMimeType[] ="application/o1d"; 83 const char kO1DPluginMimeType[] ="application/o1d";
91 const char kO1DPluginExtension[] = ""; 84 const char kO1DPluginExtension[] = "";
92 const char kO1DPluginDescription[] = "Google Talk Plugin Video Renderer"; 85 const char kO1DPluginDescription[] = "Google Talk Plugin Video Renderer";
93 const uint32 kO1DPluginPermissions = ppapi::PERMISSION_PRIVATE | 86 const uint32 kO1DPluginPermissions = ppapi::PERMISSION_PRIVATE |
94 ppapi::PERMISSION_DEV; 87 ppapi::PERMISSION_DEV;
95 88
96 const char kEffectsPluginName[] = "Google Talk Effects Plugin"; 89 const char kEffectsPluginName[] = "Google Talk Effects Plugin";
97 const char kEffectsPluginMimeType[] ="application/x-ppapi-hangouts-effects"; 90 const char kEffectsPluginMimeType[] ="application/x-ppapi-hangouts-effects";
98 const char kEffectsPluginExtension[] = ""; 91 const char kEffectsPluginExtension[] = "";
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 kPnaclPluginDescription); 193 kPnaclPluginDescription);
201 nacl.mime_types.push_back(pnacl_mime_type); 194 nacl.mime_types.push_back(pnacl_mime_type);
202 } 195 }
203 nacl.permissions = kNaClPluginPermissions; 196 nacl.permissions = kNaClPluginPermissions;
204 plugins->push_back(nacl); 197 plugins->push_back(nacl);
205 198
206 skip_nacl_file_check = true; 199 skip_nacl_file_check = true;
207 } 200 }
208 } 201 }
209 202
210 // TODO(jhorwich|noahric): Remove o3d ppapi code once o3d is replaced
211 // entirely with o1d.
212 static bool skip_o3d_file_check = false;
213 if (PathService::Get(chrome::FILE_O3D_PLUGIN, &path)) {
214 if (skip_o3d_file_check || base::PathExists(path)) {
215 content::PepperPluginInfo o3d;
216 o3d.path = path;
217 o3d.name = kO3DPluginName;
218 o3d.is_out_of_process = true;
219 o3d.is_sandboxed = false;
220 o3d.permissions = kO3DPluginPermissions;
221 content::WebPluginMimeType o3d_mime_type(kO3DPluginMimeType,
222 kO3DPluginExtension,
223 kO3DPluginDescription);
224 o3d.mime_types.push_back(o3d_mime_type);
225 plugins->push_back(o3d);
226
227 skip_o3d_file_check = true;
228 }
229 }
230
231 static bool skip_o1d_file_check = false; 203 static bool skip_o1d_file_check = false;
232 if (PathService::Get(chrome::FILE_O1D_PLUGIN, &path)) { 204 if (PathService::Get(chrome::FILE_O1D_PLUGIN, &path)) {
233 if (skip_o1d_file_check || base::PathExists(path)) { 205 if (skip_o1d_file_check || base::PathExists(path)) {
234 content::PepperPluginInfo o1d; 206 content::PepperPluginInfo o1d;
235 o1d.path = path; 207 o1d.path = path;
236 o1d.name = kO1DPluginName; 208 o1d.name = kO1DPluginName;
237 o1d.is_out_of_process = true; 209 o1d.is_out_of_process = true;
238 o1d.is_sandboxed = false; 210 o1d.is_sandboxed = false;
239 o1d.permissions = kO1DPluginPermissions; 211 o1d.permissions = kO1DPluginPermissions;
240 content::WebPluginMimeType o1d_mime_type(kO1DPluginMimeType, 212 content::WebPluginMimeType o1d_mime_type(kO1DPluginMimeType,
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after
565 *sandbox_profile_resource_id = IDR_NACL_SANDBOX_PROFILE; 537 *sandbox_profile_resource_id = IDR_NACL_SANDBOX_PROFILE;
566 return true; 538 return true;
567 } 539 }
568 return false; 540 return false;
569 } 541 }
570 542
571 std::string ChromeContentClient::GetCarbonInterposePath() const { 543 std::string ChromeContentClient::GetCarbonInterposePath() const {
572 return std::string(kInterposeLibraryPath); 544 return std::string(kInterposeLibraryPath);
573 } 545 }
574 #endif 546 #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