OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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_GLUE_PLUGIN_PLUGIN_LIB_H_ | 5 #ifndef WEBKIT_GLUE_PLUGIN_PLUGIN_LIB_H_ |
6 #define WEBKIT_GLUE_PLUGIN_PLUGIN_LIB_H_ | 6 #define WEBKIT_GLUE_PLUGIN_PLUGIN_LIB_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 15 matching lines...) Expand all Loading... |
26 // manager for new PluginInstances. | 26 // manager for new PluginInstances. |
27 class PluginLib : public base::RefCounted<PluginLib> { | 27 class PluginLib : public base::RefCounted<PluginLib> { |
28 public: | 28 public: |
29 static PluginLib* CreatePluginLib(const FilePath& filename); | 29 static PluginLib* CreatePluginLib(const FilePath& filename); |
30 | 30 |
31 // Creates a WebPluginInfo structure given a plugin's path. On success | 31 // Creates a WebPluginInfo structure given a plugin's path. On success |
32 // returns true, with the information being put into "info". | 32 // 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. | 33 // Returns false if the library couldn't be found, or if it's not a plugin. |
34 static bool ReadWebPluginInfo(const FilePath& filename, WebPluginInfo* info); | 34 static bool ReadWebPluginInfo(const FilePath& filename, WebPluginInfo* info); |
35 | 35 |
36 #if defined(OS_LINUX) | 36 #if defined(OS_POSIX) && !defined(OS_MACOSX) |
37 // Parse the result of an NP_GetMIMEDescription() call. | 37 // Parse the result of an NP_GetMIMEDescription() call. |
38 // This API is only used on Linux, and is exposed here for testing. | 38 // This API is only used on Unixes, and is exposed here for testing. |
39 static void ParseMIMEDescription(const std::string& description, | 39 static void ParseMIMEDescription(const std::string& description, |
40 std::vector<WebPluginMimeType>* mime_types); | 40 std::vector<WebPluginMimeType>* mime_types); |
41 #endif | 41 #endif |
42 | 42 |
43 // Unloads all the loaded plugin libraries and cleans up the plugin map. | 43 // Unloads all the loaded plugin libraries and cleans up the plugin map. |
44 static void UnloadAllPlugins(); | 44 static void UnloadAllPlugins(); |
45 | 45 |
46 // Shuts down all loaded plugin instances. | 46 // Shuts down all loaded plugin instances. |
47 static void ShutdownAllPlugins(); | 47 static void ShutdownAllPlugins(); |
48 | 48 |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 | 105 |
106 // Function pointers to entry points into the plugin. | 106 // Function pointers to entry points into the plugin. |
107 PluginEntryPoints entry_points_; | 107 PluginEntryPoints entry_points_; |
108 | 108 |
109 DISALLOW_COPY_AND_ASSIGN(PluginLib); | 109 DISALLOW_COPY_AND_ASSIGN(PluginLib); |
110 }; | 110 }; |
111 | 111 |
112 } // namespace NPAPI | 112 } // namespace NPAPI |
113 | 113 |
114 #endif // WEBKIT_GLUE_PLUGIN_PLUGIN_LIB_H_ | 114 #endif // WEBKIT_GLUE_PLUGIN_PLUGIN_LIB_H_ |
OLD | NEW |