| 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/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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |