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 17 matching lines...) Expand all Loading... |
28 class PluginLib : public base::RefCounted<PluginLib> { | 28 class PluginLib : public base::RefCounted<PluginLib> { |
29 public: | 29 public: |
30 static PluginLib* CreatePluginLib(const FilePath& filename); | 30 static PluginLib* CreatePluginLib(const FilePath& filename); |
31 virtual ~PluginLib(); | 31 virtual ~PluginLib(); |
32 | 32 |
33 // Creates a WebPluginInfo structure given a plugin's path. On success | 33 // Creates a WebPluginInfo structure given a plugin's path. On success |
34 // returns true, with the information being put into "info". | 34 // returns true, with the information being put into "info". |
35 // Returns false if the library couldn't be found, or if it's not a plugin. | 35 // Returns false if the library couldn't be found, or if it's not a plugin. |
36 static bool ReadWebPluginInfo(const FilePath& filename, WebPluginInfo* info); | 36 static bool ReadWebPluginInfo(const FilePath& filename, WebPluginInfo* info); |
37 | 37 |
38 #if defined(OS_LINUX) | 38 #if defined(OS_LINUX) || defined(OS_FREEBSD) |
39 // Parse the result of an NP_GetMIMEDescription() call. | 39 // Parse the result of an NP_GetMIMEDescription() call. |
40 // This API is only used on Linux, and is exposed here for testing. | 40 // This API is only used on Linux, and is exposed here for testing. |
41 static void ParseMIMEDescription(const std::string& description, | 41 static void ParseMIMEDescription(const std::string& description, |
42 std::vector<WebPluginMimeType>* mime_types); | 42 std::vector<WebPluginMimeType>* mime_types); |
43 #endif | 43 #endif |
44 | 44 |
45 // Unloads all the loaded plugin libraries and cleans up the plugin map. | 45 // Unloads all the loaded plugin libraries and cleans up the plugin map. |
46 static void UnloadAllPlugins(); | 46 static void UnloadAllPlugins(); |
47 | 47 |
48 // Shuts down all loaded plugin instances. | 48 // Shuts down all loaded plugin instances. |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 | 101 |
102 // Function pointers to entry points into the plugin. | 102 // Function pointers to entry points into the plugin. |
103 PluginEntryPoints entry_points_; | 103 PluginEntryPoints entry_points_; |
104 | 104 |
105 DISALLOW_EVIL_CONSTRUCTORS(PluginLib); | 105 DISALLOW_EVIL_CONSTRUCTORS(PluginLib); |
106 }; | 106 }; |
107 | 107 |
108 } // namespace NPAPI | 108 } // namespace NPAPI |
109 | 109 |
110 #endif // WEBKIT_GLUE_PLUGIN_PLUGIN_LIB_H__ | 110 #endif // WEBKIT_GLUE_PLUGIN_PLUGIN_LIB_H__ |
OLD | NEW |