diff options
author | avi@google.com <avi@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-01-06 16:48:45 +0000 |
---|---|---|
committer | avi@google.com <avi@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-01-06 16:48:45 +0000 |
commit | 690a99c80e4fe4e6eda9010b88e4438f57912336 (patch) | |
tree | 423390d4af89abd910ffd69f5e446720b1aa5b1f /chrome/common/chrome_plugin_lib.h | |
parent | 8c643f00166c14b146f8e5e0d2beedddacb58aab (diff) | |
download | chromium_src-690a99c80e4fe4e6eda9010b88e4438f57912336.zip chromium_src-690a99c80e4fe4e6eda9010b88e4438f57912336.tar.gz chromium_src-690a99c80e4fe4e6eda9010b88e4438f57912336.tar.bz2 |
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
Diffstat (limited to 'chrome/common/chrome_plugin_lib.h')
-rw-r--r-- | chrome/common/chrome_plugin_lib.h | 25 |
1 files changed, 13 insertions, 12 deletions
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 <string> #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<ChromePluginLib> { 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<ChromePluginLib> { CPID cpid() { return reinterpret_cast<CPID>(this); } - const std::wstring& filename() { return filename_; } + const FilePath& filename() { return filename_; } // Plugin API functions @@ -62,7 +63,7 @@ class ChromePluginLib : public base::RefCounted<ChromePluginLib> { private: friend class base::RefCounted<ChromePluginLib>; - ChromePluginLib(const std::wstring& filename); + ChromePluginLib(const FilePath& filename); ~ChromePluginLib(); // Method to initialize a Plugin. @@ -79,20 +80,20 @@ class ChromePluginLib : public base::RefCounted<ChromePluginLib> { // 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); }; |