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_NPAPI_PLUGIN_LIB_H_ | 5 #ifndef WEBKIT_PLUGINS_NPAPI_PLUGIN_LIB_H_ |
6 #define WEBKIT_PLUGINS_NPAPI_PLUGIN_LIB_H_ | 6 #define WEBKIT_PLUGINS_NPAPI_PLUGIN_LIB_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/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
13 #include "base/native_library.h" | 13 #include "base/native_library.h" |
14 #include "build/build_config.h" | 14 #include "build/build_config.h" |
15 #include "webkit/plugins/npapi/plugin_list.h" | 15 #include "webkit/plugins/npapi/plugin_list.h" |
16 #include "webkit/plugins/npapi/webplugin.h" | 16 #include "webkit/plugins/npapi/webplugin.h" |
| 17 #include "webkit/plugins/webkit_plugins_export.h" |
17 | 18 |
18 class FilePath; | 19 class FilePath; |
19 | 20 |
20 namespace webkit { | 21 namespace webkit { |
21 namespace npapi { | 22 namespace npapi { |
22 | 23 |
23 class PluginInstance; | 24 class PluginInstance; |
24 | 25 |
25 // A PluginLib is a single NPAPI Plugin Library, and is the lifecycle | 26 // A PluginLib is a single NPAPI Plugin Library, and is the lifecycle |
26 // manager for new PluginInstances. | 27 // manager for new PluginInstances. |
27 class PluginLib : public base::RefCounted<PluginLib> { | 28 class WEBKIT_PLUGINS_EXPORT PluginLib : public base::RefCounted<PluginLib> { |
28 public: | 29 public: |
29 static PluginLib* CreatePluginLib(const FilePath& filename); | 30 static PluginLib* CreatePluginLib(const FilePath& filename); |
30 | 31 |
31 // Creates a WebPluginInfo structure given a plugin's path. On success | 32 // Creates a WebPluginInfo structure given a plugin's path. On success |
32 // returns true, with the information being put into "info". | 33 // returns true, with the information being put into "info". |
33 // Returns false if the library couldn't be found, or if it's not a plugin. | 34 // Returns false if the library couldn't be found, or if it's not a plugin. |
34 static bool ReadWebPluginInfo(const FilePath& filename, | 35 static bool ReadWebPluginInfo(const FilePath& filename, |
35 webkit::WebPluginInfo* info); | 36 webkit::WebPluginInfo* info); |
36 | 37 |
37 #if defined(OS_POSIX) && !defined(OS_MACOSX) | 38 #if defined(OS_POSIX) && !defined(OS_MACOSX) |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
133 // Set to true if unloading of the plugin dll is to be deferred. | 134 // Set to true if unloading of the plugin dll is to be deferred. |
134 bool defer_unload_; | 135 bool defer_unload_; |
135 | 136 |
136 DISALLOW_COPY_AND_ASSIGN(PluginLib); | 137 DISALLOW_COPY_AND_ASSIGN(PluginLib); |
137 }; | 138 }; |
138 | 139 |
139 } // namespace npapi | 140 } // namespace npapi |
140 } // namespace webkit | 141 } // namespace webkit |
141 | 142 |
142 #endif // WEBKIT_PLUGINS_NPAPI_PLUGIN_LIB_H_ | 143 #endif // WEBKIT_PLUGINS_NPAPI_PLUGIN_LIB_H_ |
OLD | NEW |