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 #ifndef CONTENT_PUBLIC_COMMON_PEPPER_PLUGIN_INFO_H_ | 5 #ifndef CONTENT_PUBLIC_COMMON_PEPPER_PLUGIN_INFO_H_ |
6 #define CONTENT_PUBLIC_COMMON_PEPPER_PLUGIN_INFO_H_ | 6 #define CONTENT_PUBLIC_COMMON_PEPPER_PLUGIN_INFO_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/files/file_path.h" | 11 #include "base/files/file_path.h" |
12 #include "content/common/content_export.h" | 12 #include "content/common/content_export.h" |
13 #include "content/public/common/webplugininfo.h" | 13 #include "content/public/common/webplugininfo.h" |
14 #include "webkit/plugins/ppapi/plugin_module.h" | 14 #include "ppapi/c/pp_module.h" |
| 15 #include "ppapi/c/ppb.h" |
15 | 16 |
16 namespace content { | 17 namespace content { |
17 | 18 |
18 struct CONTENT_EXPORT PepperPluginInfo { | 19 struct CONTENT_EXPORT PepperPluginInfo { |
| 20 typedef const void* (*GetInterfaceFunc)(const char*); |
| 21 typedef int (*PPP_InitializeModuleFunc)(PP_Module, PPB_GetInterface); |
| 22 typedef void (*PPP_ShutdownModuleFunc)(); |
| 23 |
| 24 struct EntryPoints { |
| 25 // This structure is POD, with the constructor initializing to NULL. |
| 26 CONTENT_EXPORT EntryPoints(); |
| 27 |
| 28 GetInterfaceFunc get_interface; |
| 29 PPP_InitializeModuleFunc initialize_module; |
| 30 PPP_ShutdownModuleFunc shutdown_module; // Optional, may be NULL. |
| 31 }; |
| 32 |
19 PepperPluginInfo(); | 33 PepperPluginInfo(); |
20 ~PepperPluginInfo(); | 34 ~PepperPluginInfo(); |
21 | 35 |
22 WebPluginInfo ToWebPluginInfo() const; | 36 WebPluginInfo ToWebPluginInfo() const; |
23 | 37 |
24 // Indicates internal plugins for which there's not actually a library. | 38 // Indicates internal plugins for which there's not actually a library. |
25 // These plugins are implemented in the Chrome binary using a separate set | 39 // These plugins are implemented in the Chrome binary using a separate set |
26 // of entry points (see internal_entry_points below). | 40 // of entry points (see internal_entry_points below). |
27 // Defaults to false. | 41 // Defaults to false. |
28 bool is_internal; | 42 bool is_internal; |
29 | 43 |
30 // True when this plugin should be run out of process. Defaults to false. | 44 // True when this plugin should be run out of process. Defaults to false. |
31 bool is_out_of_process; | 45 bool is_out_of_process; |
32 | 46 |
33 // True when an out-of-process plugin should also be run within sandbox. | 47 // True when an out-of-process plugin should also be run within sandbox. |
34 // Defaults to true. | 48 // Defaults to true. |
35 bool is_sandboxed; | 49 bool is_sandboxed; |
36 | 50 |
37 base::FilePath path; // Internal plugins have "internal-[name]" as path. | 51 base::FilePath path; // Internal plugins have "internal-[name]" as path. |
38 std::string name; | 52 std::string name; |
39 std::string description; | 53 std::string description; |
40 std::string version; | 54 std::string version; |
41 std::vector<WebPluginMimeType> mime_types; | 55 std::vector<WebPluginMimeType> mime_types; |
42 | 56 |
43 // When is_internal is set, this contains the function pointers to the | 57 // When is_internal is set, this contains the function pointers to the |
44 // entry points for the internal plugins. | 58 // entry points for the internal plugins. |
45 webkit::ppapi::PluginModule::EntryPoints internal_entry_points; | 59 EntryPoints internal_entry_points; |
46 | 60 |
47 // Permission bits from ppapi::Permission. | 61 // Permission bits from ppapi::Permission. |
48 uint32 permissions; | 62 uint32 permissions; |
49 }; | 63 }; |
50 | 64 |
51 } // namespace content | 65 } // namespace content |
52 | 66 |
53 #endif // CONTENT_PUBLIC_COMMON_PEPPER_PLUGIN_INFO_H_ | 67 #endif // CONTENT_PUBLIC_COMMON_PEPPER_PLUGIN_INFO_H_ |
OLD | NEW |