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 "base/version.h" | |
13 #include "webkit/plugins/webkit_plugins_export.h" | 14 #include "webkit/plugins/webkit_plugins_export.h" |
14 | 15 |
15 namespace webkit { | 16 namespace webkit { |
16 | 17 |
17 struct WEBKIT_PLUGINS_EXPORT WebPluginMimeType { | 18 struct WEBKIT_PLUGINS_EXPORT WebPluginMimeType { |
18 WebPluginMimeType(); | 19 WebPluginMimeType(); |
19 // A constructor for the common case of a single file extension and an ASCII | 20 // A constructor for the common case of a single file extension and an ASCII |
20 // description. | 21 // description. |
21 WebPluginMimeType(const std::string& m, | 22 WebPluginMimeType(const std::string& m, |
22 const std::string& f, | 23 const std::string& f, |
(...skipping 27 matching lines...) Expand all Loading... | |
50 WebPluginInfo(const WebPluginInfo& rhs); | 51 WebPluginInfo(const WebPluginInfo& rhs); |
51 ~WebPluginInfo(); | 52 ~WebPluginInfo(); |
52 WebPluginInfo& operator=(const WebPluginInfo& rhs); | 53 WebPluginInfo& operator=(const WebPluginInfo& rhs); |
53 | 54 |
54 // Special constructor only used during unit testing: | 55 // Special constructor only used during unit testing: |
55 WebPluginInfo(const string16& fake_name, | 56 WebPluginInfo(const string16& fake_name, |
56 const FilePath& fake_path, | 57 const FilePath& fake_path, |
57 const string16& fake_version, | 58 const string16& fake_version, |
58 const string16& fake_desc); | 59 const string16& fake_desc); |
59 | 60 |
61 // Parse a version string as used by a plug-in. This method is more lenient | |
62 // in accepting weird version strings than Version::GetFromString(). | |
63 static void CreateVersionFromString(const string16& version_string, | |
jam
2012/08/29 22:26:13
a struct shouldn't have member functions per the s
ibraaaa
2012/08/30 08:08:48
It used to be in PluginGroup but we are doing this
| |
64 Version* version); | |
65 | |
60 // The name of the plugin (i.e. Flash). | 66 // The name of the plugin (i.e. Flash). |
61 string16 name; | 67 string16 name; |
62 | 68 |
63 // The path to the plugin file (DLL/bundle/library). | 69 // The path to the plugin file (DLL/bundle/library). |
64 FilePath path; | 70 FilePath path; |
65 | 71 |
66 // The version number of the plugin file (may be OS-specific) | 72 // The version number of the plugin file (may be OS-specific) |
67 string16 version; | 73 string16 version; |
68 | 74 |
69 // A description of the plugin that we get from its version info. | 75 // A description of the plugin that we get from its version info. |
(...skipping 10 matching lines...) Expand all Loading... | |
80 }; | 86 }; |
81 | 87 |
82 // Checks whether a plugin is a Pepper plugin, enabled or disabled. | 88 // Checks whether a plugin is a Pepper plugin, enabled or disabled. |
83 WEBKIT_PLUGINS_EXPORT bool IsPepperPlugin(const WebPluginInfo& plugin); | 89 WEBKIT_PLUGINS_EXPORT bool IsPepperPlugin(const WebPluginInfo& plugin); |
84 | 90 |
85 WEBKIT_PLUGINS_EXPORT bool IsOutOfProcessPlugin(const WebPluginInfo& plugin); | 91 WEBKIT_PLUGINS_EXPORT bool IsOutOfProcessPlugin(const WebPluginInfo& plugin); |
86 | 92 |
87 } // namespace webkit | 93 } // namespace webkit |
88 | 94 |
89 #endif // WEBKIT_PLUGINS_WEBPLUGININFO_H_ | 95 #endif // WEBKIT_PLUGINS_WEBPLUGININFO_H_ |
OLD | NEW |