Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add static method BrowserPlugin::getFSPath()

  • Loading branch information...
commit 412e812c01f896e201556c06ca4a8f7b8ce5f7eb 1 parent aa62148
@taxilian taxilian authored
View
6 src/PluginCore/BrowserPlugin.cpp
@@ -1,4 +1,4 @@
-/**********************************************************\
+/**********************************************************\
Original Author: Richard Bateman (taxilian)
Created: Oct 19, 2009
@@ -19,6 +19,8 @@ Copyright 2009 Richard Bateman, Firebreath development team
using namespace FB;
+std::string BrowserPlugin::fileSystemPath;
+
BrowserPlugin::BrowserPlugin(const std::string& mimetype) :
pluginMain(getFactoryInstance()->createPlugin(mimetype))
{
@@ -30,7 +32,7 @@ BrowserPlugin::~BrowserPlugin()
void BrowserPlugin::setFSPath(const std::string& path)
{
- m_filesystemPath = path;
+ fileSystemPath = path;
pluginMain->setFSPath(path);
}
View
11 src/PluginCore/BrowserPlugin.h
@@ -1,4 +1,4 @@
-/**********************************************************\
+/**********************************************************\
Original Author: Richard Bateman (taxilian)
Created: Oct 19, 2009
@@ -29,10 +29,10 @@ namespace FB {
/// @class BrowserPlugin
///
/// @brief Browser-specific plugin base class
- ///
+ ///
/// This object is the base class for FBControl and NpapiPlugin, which are the browser-specific
/// plugin classes that contain a PluginCore derived plugin object.
- ///
+ ///
/// Unless you are working on the core you shouldn't need to worry about this.
////////////////////////////////////////////////////////////////////////////////////////////////////
class BrowserPlugin : boost::noncopyable
@@ -44,11 +44,14 @@ namespace FB {
virtual void shutdown() = 0;
virtual void setFSPath(const std::string& path);
+ static std::string getFSPath() { return fileSystemPath; }
+
protected:
- std::string m_filesystemPath;
// Even though this is a shared pointer, don't ever hold onto a reference to it except
// as a weak_ptr, and then don't keep it locked longer than needed.
FB::PluginCorePtr pluginMain;
+
+ static std::string fileSystemPath;
};
};
Please sign in to comment.
Something went wrong with that request. Please try again.