diff options
author | steveblock@chromium.org <steveblock@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-09-21 19:29:02 +0000 |
---|---|---|
committer | steveblock@chromium.org <steveblock@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-09-21 19:29:02 +0000 |
commit | 0763592a19d173eafc3d725980d6b117927b45dc (patch) | |
tree | f941e8b692cdcb81e8405f15f3d72271477f245a /content/common/npobject_stub.cc | |
parent | f020428b6ff317d7785c97468fd2173cccfa097e (diff) | |
download | chromium_src-0763592a19d173eafc3d725980d6b117927b45dc.zip chromium_src-0763592a19d173eafc3d725980d6b117927b45dc.tar.gz chromium_src-0763592a19d173eafc3d725980d6b117927b45dc.tar.bz2 |
Modify NPObjectStub::OnSetProperty() to get the plugin path from the command line directly
This avoids the need for NPObjectStub to use PluginThread::plugin_path() and allows us to remove the content/plugin/ include from npobject_stub.cc. We can also remove PluginThread::plugin_path().
Refactoring only, no functional change.
BUG=96703
Review URL: http://codereview.chromium.org/7982026
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@102145 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/common/npobject_stub.cc')
-rw-r--r-- | content/common/npobject_stub.cc | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/content/common/npobject_stub.cc b/content/common/npobject_stub.cc index af0f33a..ee82a31 100644 --- a/content/common/npobject_stub.cc +++ b/content/common/npobject_stub.cc @@ -4,17 +4,17 @@ #include "content/common/npobject_stub.h" +#include "base/command_line.h" #include "content/common/content_client.h" +#include "content/common/content_switches.h" +#include "content/common/np_channel_base.h" #include "content/common/npobject_util.h" #include "content/common/plugin_messages.h" -#include "content/plugin/plugin_thread.h" #include "third_party/npapi/bindings/npapi.h" #include "third_party/npapi/bindings/npruntime.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebBindings.h" #include "webkit/plugins/npapi/plugin_constants_win.h" -class NPChannelBase; - using WebKit::WebBindings; NPObjectStub::NPObjectStub( @@ -242,8 +242,11 @@ void NPObjectStub::OnSetProperty(const NPIdentifier_Param& name, if (IsPluginProcess()) { if (npobject_->_class->setProperty) { #if defined(OS_WIN) + static FilePath plugin_path = + CommandLine::ForCurrentProcess()->GetSwitchValuePath( + switches::kPluginPath); static std::wstring filename = StringToLowerASCII( - PluginThread::current()->plugin_path().BaseName().value()); + plugin_path.BaseName().value()); static NPIdentifier fullscreen = WebBindings::getStringIdentifier("fullScreen"); if (filename == webkit::npapi::kNewWMPPlugin && id == fullscreen) { |