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 WEBKIT_PLUGINS_WEBPLUGININFO_H_ | 5 #ifndef WEBKIT_PLUGINS_WEBPLUGININFO_H_ |
6 #define WEBKIT_PLUGINS_WEBPLUGININFO_H_ | 6 #define WEBKIT_PLUGINS_WEBPLUGININFO_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
12 #include "base/file_path.h" | 12 #include "base/file_path.h" |
| 13 #include "webkit/plugins/webkit_plugins_export.h" |
13 | 14 |
14 namespace webkit { | 15 namespace webkit { |
15 | 16 |
16 struct WebPluginMimeType { | 17 struct WEBKIT_PLUGINS_EXPORT WebPluginMimeType { |
17 WebPluginMimeType(); | 18 WebPluginMimeType(); |
18 // A constructor for the common case of a single file extension and an ASCII | 19 // A constructor for the common case of a single file extension and an ASCII |
19 // description. | 20 // description. |
20 WebPluginMimeType(const std::string& m, | 21 WebPluginMimeType(const std::string& m, |
21 const std::string& f, | 22 const std::string& f, |
22 const std::string& d); | 23 const std::string& d); |
23 ~WebPluginMimeType(); | 24 ~WebPluginMimeType(); |
24 | 25 |
25 // The name of the mime type (e.g., "application/x-shockwave-flash"). | 26 // The name of the mime type (e.g., "application/x-shockwave-flash"). |
26 std::string mime_type; | 27 std::string mime_type; |
27 | 28 |
28 // A list of all the file extensions for this mime type. | 29 // A list of all the file extensions for this mime type. |
29 std::vector<std::string> file_extensions; | 30 std::vector<std::string> file_extensions; |
30 | 31 |
31 // Description of the mime type. | 32 // Description of the mime type. |
32 string16 description; | 33 string16 description; |
33 | 34 |
34 // Extra parameters to include when instantiating the plugin. | 35 // Extra parameters to include when instantiating the plugin. |
35 std::vector<string16> additional_param_names; | 36 std::vector<string16> additional_param_names; |
36 std::vector<string16> additional_param_values; | 37 std::vector<string16> additional_param_values; |
37 }; | 38 }; |
38 | 39 |
39 // Describes an available NPAPI or Pepper plugin. | 40 // Describes an available NPAPI or Pepper plugin. |
40 struct WebPluginInfo { | 41 struct WEBKIT_PLUGINS_EXPORT WebPluginInfo { |
41 enum PluginType { | 42 enum PluginType { |
42 PLUGIN_TYPE_NPAPI, | 43 PLUGIN_TYPE_NPAPI, |
43 PLUGIN_TYPE_PEPPER_IN_PROCESS, | 44 PLUGIN_TYPE_PEPPER_IN_PROCESS, |
44 PLUGIN_TYPE_PEPPER_OUT_OF_PROCESS, | 45 PLUGIN_TYPE_PEPPER_OUT_OF_PROCESS, |
45 PLUGIN_TYPE_PEPPER_UNSANDBOXED | 46 PLUGIN_TYPE_PEPPER_UNSANDBOXED |
46 }; | 47 }; |
47 | 48 |
48 WebPluginInfo(); | 49 WebPluginInfo(); |
49 WebPluginInfo(const WebPluginInfo& rhs); | 50 WebPluginInfo(const WebPluginInfo& rhs); |
50 ~WebPluginInfo(); | 51 ~WebPluginInfo(); |
(...skipping 18 matching lines...) Expand all Loading... |
69 string16 desc; | 70 string16 desc; |
70 | 71 |
71 // A list of all the mime types that this plugin supports. | 72 // A list of all the mime types that this plugin supports. |
72 std::vector<WebPluginMimeType> mime_types; | 73 std::vector<WebPluginMimeType> mime_types; |
73 | 74 |
74 // Plugin type. See the PluginType enum. | 75 // Plugin type. See the PluginType enum. |
75 int type; | 76 int type; |
76 }; | 77 }; |
77 | 78 |
78 // Checks whether a plugin is a Pepper plugin, enabled or disabled. | 79 // Checks whether a plugin is a Pepper plugin, enabled or disabled. |
79 bool IsPepperPlugin(const WebPluginInfo& plugin); | 80 WEBKIT_PLUGINS_EXPORT bool IsPepperPlugin(const WebPluginInfo& plugin); |
80 | 81 |
81 bool IsOutOfProcessPlugin(const WebPluginInfo& plugin); | 82 WEBKIT_PLUGINS_EXPORT bool IsOutOfProcessPlugin(const WebPluginInfo& plugin); |
82 | 83 |
83 } // namespace webkit | 84 } // namespace webkit |
84 | 85 |
85 #endif // WEBKIT_PLUGINS_WEBPLUGININFO_H_ | 86 #endif // WEBKIT_PLUGINS_WEBPLUGININFO_H_ |
OLD | NEW |