| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #ifndef CONTENT_COMMON_PEPPER_PLUGIN_REGISTRY_H_ | 5 #ifndef CONTENT_COMMON_PEPPER_PLUGIN_REGISTRY_H_ |
| 6 #define CONTENT_COMMON_PEPPER_PLUGIN_REGISTRY_H_ | 6 #define CONTENT_COMMON_PEPPER_PLUGIN_REGISTRY_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <list> | 9 #include <list> |
| 10 #include <map> | 10 #include <map> |
| 11 #include <string> | 11 #include <string> |
| 12 #include <vector> | 12 #include <vector> |
| 13 | 13 |
| 14 #include "base/file_path.h" | 14 #include "base/file_path.h" |
| 15 #include "ppapi/proxy/proxy_channel.h" | 15 #include "ppapi/proxy/proxy_channel.h" |
| 16 #include "webkit/plugins/npapi/webplugininfo.h" | |
| 17 #include "webkit/plugins/ppapi/plugin_delegate.h" | 16 #include "webkit/plugins/ppapi/plugin_delegate.h" |
| 18 #include "webkit/plugins/ppapi/plugin_module.h" | 17 #include "webkit/plugins/ppapi/plugin_module.h" |
| 18 #include "webkit/plugins/webplugininfo.h" |
| 19 | 19 |
| 20 struct PepperPluginInfo { | 20 struct PepperPluginInfo { |
| 21 PepperPluginInfo(); | 21 PepperPluginInfo(); |
| 22 ~PepperPluginInfo(); | 22 ~PepperPluginInfo(); |
| 23 | 23 |
| 24 webkit::npapi::WebPluginInfo ToWebPluginInfo() const; | 24 webkit::WebPluginInfo ToWebPluginInfo() const; |
| 25 | 25 |
| 26 // Indicates internal plugins for which there's not actually a library. | 26 // Indicates internal plugins for which there's not actually a library. |
| 27 // These plugins are implemented in the Chrome binary using a separate set | 27 // These plugins are implemented in the Chrome binary using a separate set |
| 28 // of entry points (see internal_entry_points below). | 28 // of entry points (see internal_entry_points below). |
| 29 // Defaults to false. | 29 // Defaults to false. |
| 30 bool is_internal; | 30 bool is_internal; |
| 31 | 31 |
| 32 // True when this plugin should be run out of process. Defaults to false. | 32 // True when this plugin should be run out of process. Defaults to false. |
| 33 bool is_out_of_process; | 33 bool is_out_of_process; |
| 34 | 34 |
| 35 // Whether the plugin is enabled. Defaults to true. | 35 // Whether the plugin is enabled. Defaults to true. |
| 36 bool enabled; | 36 bool enabled; |
| 37 | 37 |
| 38 FilePath path; // Internal plugins have "internal-[name]" as path. | 38 FilePath path; // Internal plugins have "internal-[name]" as path. |
| 39 std::string name; | 39 std::string name; |
| 40 std::string description; | 40 std::string description; |
| 41 std::string version; | 41 std::string version; |
| 42 std::vector<webkit::npapi::WebPluginMimeType> mime_types; | 42 std::vector<webkit::WebPluginMimeType> mime_types; |
| 43 | 43 |
| 44 // When is_internal is set, this contains the function pointers to the | 44 // When is_internal is set, this contains the function pointers to the |
| 45 // entry points for the internal plugins. | 45 // entry points for the internal plugins. |
| 46 webkit::ppapi::PluginModule::EntryPoints internal_entry_points; | 46 webkit::ppapi::PluginModule::EntryPoints internal_entry_points; |
| 47 }; | 47 }; |
| 48 | 48 |
| 49 // This class holds references to all of the known pepper plugin modules. | 49 // This class holds references to all of the known pepper plugin modules. |
| 50 // | 50 // |
| 51 // It keeps two lists. One list of preloaded in-process modules, and one list | 51 // It keeps two lists. One list of preloaded in-process modules, and one list |
| 52 // is a list of all live modules (some of which may be out-of-process and hence | 52 // is a list of all live modules (some of which may be out-of-process and hence |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 // non-crashed modules. If an out-of-process module crashes, it may | 115 // non-crashed modules. If an out-of-process module crashes, it may |
| 116 // continue as long as there are WebKit references to it, but it will not | 116 // continue as long as there are WebKit references to it, but it will not |
| 117 // appear in this list. | 117 // appear in this list. |
| 118 typedef std::map<FilePath, webkit::ppapi::PluginModule*> NonOwningModuleMap; | 118 typedef std::map<FilePath, webkit::ppapi::PluginModule*> NonOwningModuleMap; |
| 119 NonOwningModuleMap live_modules_; | 119 NonOwningModuleMap live_modules_; |
| 120 | 120 |
| 121 DISALLOW_COPY_AND_ASSIGN(PepperPluginRegistry); | 121 DISALLOW_COPY_AND_ASSIGN(PepperPluginRegistry); |
| 122 }; | 122 }; |
| 123 | 123 |
| 124 #endif // CONTENT_COMMON_PEPPER_PLUGIN_REGISTRY_H_ | 124 #endif // CONTENT_COMMON_PEPPER_PLUGIN_REGISTRY_H_ |
| OLD | NEW |