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