OLD | NEW |
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/logging.h" | 9 #include "base/logging.h" |
10 #include "base/native_library.h" | 10 #include "base/native_library.h" |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 if (name_parts.size() > 3) | 65 if (name_parts.size() > 3) |
66 plugin.version = name_parts[3]; | 66 plugin.version = name_parts[3]; |
67 for (size_t j = 1; j < parts.size(); ++j) { | 67 for (size_t j = 1; j < parts.size(); ++j) { |
68 webkit::WebPluginMimeType mime_type(parts[j], | 68 webkit::WebPluginMimeType mime_type(parts[j], |
69 std::string(), | 69 std::string(), |
70 plugin.description); | 70 plugin.description); |
71 plugin.mime_types.push_back(mime_type); | 71 plugin.mime_types.push_back(mime_type); |
72 } | 72 } |
73 | 73 |
74 // Command-line plugins get full permissions. | 74 // Command-line plugins get full permissions. |
75 plugin.permissions = ppapi::PERMISSION_DEV | | 75 plugin.permissions = ppapi::PERMISSION_ALL_BITS; |
76 ppapi::PERMISSION_PRIVATE | | |
77 ppapi::PERMISSION_BYPASS_USER_GESTURE; | |
78 | 76 |
79 plugins->push_back(plugin); | 77 plugins->push_back(plugin); |
80 } | 78 } |
81 } | 79 } |
82 | 80 |
83 } // namespace | 81 } // namespace |
84 | 82 |
85 webkit::WebPluginInfo content::PepperPluginInfo::ToWebPluginInfo() const { | 83 webkit::WebPluginInfo content::PepperPluginInfo::ToWebPluginInfo() const { |
86 webkit::WebPluginInfo info; | 84 webkit::WebPluginInfo info; |
87 | 85 |
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
253 // Preload all external plugins we're not running out of process. | 251 // Preload all external plugins we're not running out of process. |
254 if (!module->InitAsLibrary(current.path)) { | 252 if (!module->InitAsLibrary(current.path)) { |
255 DLOG(ERROR) << "Failed to load pepper module: " << current.path.value(); | 253 DLOG(ERROR) << "Failed to load pepper module: " << current.path.value(); |
256 continue; | 254 continue; |
257 } | 255 } |
258 } | 256 } |
259 preloaded_modules_[current.path] = module; | 257 preloaded_modules_[current.path] = module; |
260 } | 258 } |
261 } | 259 } |
262 | 260 |
OLD | NEW |