From 690a99c80e4fe4e6eda9010b88e4438f57912336 Mon Sep 17 00:00:00 2001 From: "avi@google.com" Date: Tue, 6 Jan 2009 16:48:45 +0000 Subject: Move plugins to FilePaths, some cleanup Review URL: http://codereview.chromium.org/16456 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7588 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/common/chrome_plugin_lib.h | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) (limited to 'chrome/common/chrome_plugin_lib.h') diff --git a/chrome/common/chrome_plugin_lib.h b/chrome/common/chrome_plugin_lib.h index f58b9c8..eb2e95f 100644 --- a/chrome/common/chrome_plugin_lib.h +++ b/chrome/common/chrome_plugin_lib.h @@ -8,6 +8,7 @@ #include #include "base/basictypes.h" +#include "base/file_path.h" #include "base/ref_counted.h" #include "base/scoped_ptr.h" #include "chrome/common/chrome_plugin_api.h" @@ -20,10 +21,10 @@ class MessageLoop; // issues a NOTIFY_CHROME_PLUGIN_UNLOADED notification. class ChromePluginLib : public base::RefCounted { public: - static ChromePluginLib* Create(const std::wstring& filename, + static ChromePluginLib* Create(const FilePath& filename, const CPBrowserFuncs* bfuncs); - static ChromePluginLib* Find(const std::wstring& filename); - static void Destroy(const std::wstring& filename); + static ChromePluginLib* Find(const FilePath& filename); + static void Destroy(const FilePath& filename); static bool IsPluginThread(); static MessageLoop* GetPluginThreadLoop(); @@ -49,7 +50,7 @@ class ChromePluginLib : public base::RefCounted { CPID cpid() { return reinterpret_cast(this); } - const std::wstring& filename() { return filename_; } + const FilePath& filename() { return filename_; } // Plugin API functions @@ -62,7 +63,7 @@ class ChromePluginLib : public base::RefCounted { private: friend class base::RefCounted; - ChromePluginLib(const std::wstring& filename); + ChromePluginLib(const FilePath& filename); ~ChromePluginLib(); // Method to initialize a Plugin. @@ -79,20 +80,20 @@ class ChromePluginLib : public base::RefCounted { // Unloading the plugin DLL. void Unload(); - std::wstring filename_; // the path to the DLL - HMODULE module_; // the opened DLL handle - bool initialized_; // is the plugin initialized + FilePath filename_; // the path to the DLL + HMODULE module_; // the opened DLL handle + bool initialized_; // is the plugin initialized // DLL exports, looked up by name. - CP_VersionNegotiateFunc CP_VersionNegotiate_; - CP_InitializeFunc CP_Initialize_; + CP_VersionNegotiateFunc CP_VersionNegotiate_; + CP_InitializeFunc CP_Initialize_; // Additional function pointers provided by the plugin. - CPPluginFuncs plugin_funcs_; + CPPluginFuncs plugin_funcs_; // Used for unit tests. typedef int (STDCALL *CP_TestFunc)(void*); - CP_TestFunc CP_Test_; + CP_TestFunc CP_Test_; DISALLOW_COPY_AND_ASSIGN(ChromePluginLib); }; -- cgit v1.1