OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef WEBKIT_PLUGINS_PPAPI_PPAPI_PLUGIN_INFO_H_ |
| 6 #define WEBKIT_PLUGINS_PPAPI_PPAPI_PLUGIN_INFO_H_ |
| 7 |
| 8 #include <string> |
| 9 |
| 10 #include "base/file_path.h" |
| 11 #include "webkit/plugins/ppapi/plugin_module.h" |
| 12 #include "webkit/plugins/webplugininfo.h" |
| 13 |
| 14 namespace webkit { |
| 15 namespace ppapi { |
| 16 |
| 17 struct PluginInfo { |
| 18 PluginInfo(); |
| 19 ~PluginInfo(); |
| 20 |
| 21 // Indicates internal plugins for which there's not actually a library. |
| 22 // These plugins are implemented in the Chrome binary using a separate set |
| 23 // of entry points (see internal_entry_points below). |
| 24 // Defaults to false. |
| 25 bool is_internal; |
| 26 |
| 27 // True when this plugin should be run out of process. Defaults to false. |
| 28 bool is_out_of_process; |
| 29 |
| 30 FilePath path; // Internal plugins have "internal-[name]" as path. |
| 31 std::string name; |
| 32 std::string description; |
| 33 std::string version; |
| 34 std::vector<webkit::WebPluginMimeType> mime_types; |
| 35 |
| 36 // When is_internal is set, this contains the function pointers to the |
| 37 // entry points for the internal plugins. |
| 38 PluginModule::EntryPoints internal_entry_points; |
| 39 }; |
| 40 |
| 41 // Constructs a WebPluginInfo from a ppapi::PluginInfo. |
| 42 extern void PepperToWebPluginInfo(const PluginInfo& pepper_info, |
| 43 webkit::WebPluginInfo* web_info); |
| 44 |
| 45 // Constructs a ppapi::PluginInfo from a WebPluginInfo. Returns false if |
| 46 // the operation is not possible, in particular the WebPluginInfo::type |
| 47 // must be one of the pepper types. |
| 48 extern bool WebToPepperPluginInfo(const webkit::WebPluginInfo& web_info, |
| 49 PluginInfo* pepper_info); |
| 50 |
| 51 } // namespace ppapi |
| 52 } // namespace webkit |
| 53 |
| 54 #endif // WEBKIT_PLUGINS_PPAPI_PPAPI_PLUGIN_INFO_H_ |
OLD | NEW |