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

Side by Side Diff: content/common/pepper_plugin_registry.cc

Issue 10984094: Hook up PpapiPermissions in more places. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 2 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
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 "content/common/pepper_plugin_registry.h" 5 #include "content/common/pepper_plugin_registry.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/native_library.h" 9 #include "base/native_library.h"
10 #include "base/string_split.h" 10 #include "base/string_split.h"
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 if (name_parts.size() > 3) 64 if (name_parts.size() > 3)
65 plugin.version = name_parts[3]; 65 plugin.version = name_parts[3];
66 for (size_t j = 1; j < parts.size(); ++j) { 66 for (size_t j = 1; j < parts.size(); ++j) {
67 webkit::WebPluginMimeType mime_type(parts[j], 67 webkit::WebPluginMimeType mime_type(parts[j],
68 std::string(), 68 std::string(),
69 plugin.description); 69 plugin.description);
70 plugin.mime_types.push_back(mime_type); 70 plugin.mime_types.push_back(mime_type);
71 } 71 }
72 72
73 // Command-line plugins get full permissions. 73 // Command-line plugins get full permissions.
74 plugin.permissions = ppapi::PERMISSION_DEV | 74 plugin.permissions = ppapi::PERMISSION_ALL_BITS;
75 ppapi::PERMISSION_PRIVATE |
76 ppapi::PERMISSION_BYPASS_USER_GESTURE;
77 75
78 plugins->push_back(plugin); 76 plugins->push_back(plugin);
79 } 77 }
80 } 78 }
81 79
82 } // namespace 80 } // namespace
83 81
84 webkit::WebPluginInfo content::PepperPluginInfo::ToWebPluginInfo() const { 82 webkit::WebPluginInfo content::PepperPluginInfo::ToWebPluginInfo() const {
85 webkit::WebPluginInfo info; 83 webkit::WebPluginInfo info;
86 84
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 // Preload all external plugins we're not running out of process. 236 // Preload all external plugins we're not running out of process.
239 if (!module->InitAsLibrary(current.path)) { 237 if (!module->InitAsLibrary(current.path)) {
240 DLOG(ERROR) << "Failed to load pepper module: " << current.path.value(); 238 DLOG(ERROR) << "Failed to load pepper module: " << current.path.value();
241 continue; 239 continue;
242 } 240 }
243 } 241 }
244 preloaded_modules_[current.path] = module; 242 preloaded_modules_[current.path] = module;
245 } 243 }
246 } 244 }
247 245
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_process_host_impl.cc ('k') | content/ppapi_plugin/plugin_process_dispatcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698