summaryrefslogtreecommitdiffstats
path: root/ppapi/proxy/plugin_globals.h
diff options
context:
space:
mode:
authorbbudge@chromium.org <bbudge@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-07-11 04:37:58 +0000
committerbbudge@chromium.org <bbudge@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-07-11 04:37:58 +0000
commitf2d7c0483ea6b5ae61c38cf05b4951c0b5fc89e2 (patch)
tree05183071323228ff4f6dfe4bc69079e82be9e0df /ppapi/proxy/plugin_globals.h
parentbfcf1e9985d66f1ec405154e994ab2966a26e0c0 (diff)
downloadchromium_src-f2d7c0483ea6b5ae61c38cf05b4951c0b5fc89e2.zip
chromium_src-f2d7c0483ea6b5ae61c38cf05b4951c0b5fc89e2.tar.gz
chromium_src-f2d7c0483ea6b5ae61c38cf05b4951c0b5fc89e2.tar.bz2
Add GetFileThreadMessageLoop method to PpapiGlobals.
This is needed to implement performance critical FileIO functions on the plugin side. BUG=194304 Review URL: https://chromiumcodereview.appspot.com/18144004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@211019 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/proxy/plugin_globals.h')
-rw-r--r--ppapi/proxy/plugin_globals.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/ppapi/proxy/plugin_globals.h b/ppapi/proxy/plugin_globals.h
index 37fdc1a..014cb26 100644
--- a/ppapi/proxy/plugin_globals.h
+++ b/ppapi/proxy/plugin_globals.h
@@ -17,6 +17,9 @@
#include "ppapi/shared_impl/callback_tracker.h"
#include "ppapi/shared_impl/ppapi_globals.h"
+namespace base {
+class Thread;
+}
namespace IPC {
class Sender;
}
@@ -65,6 +68,7 @@ class PPAPI_PROXY_EXPORT PluginGlobals : public PpapiGlobals {
const std::string& source,
const std::string& value) OVERRIDE;
virtual MessageLoopShared* GetCurrentMessageLoop() OVERRIDE;
+ base::TaskRunner* GetFileTaskRunner(PP_Instance instance) OVERRIDE;
// Returns the channel for sending to the browser.
IPC::Sender* GetBrowserSender();
@@ -144,6 +148,10 @@ class PPAPI_PROXY_EXPORT PluginGlobals : public PpapiGlobals {
scoped_ptr<BrowserSender> browser_sender_;
+ // Thread for performing potentially blocking file operations. It's created
+ // lazily, since it might not be needed.
+ scoped_ptr<base::Thread> file_thread_;
+
DISALLOW_COPY_AND_ASSIGN(PluginGlobals);
};