diff options
author | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-15 22:06:21 +0000 |
---|---|---|
committer | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-04-15 22:06:21 +0000 |
commit | 1609d0d3a7d5b0f3777702308a440b22f1b42b59 (patch) | |
tree | 754be1a35ea8faa52a8dbb6a63264a2f686bea64 /webkit/plugins | |
parent | 54457f38c36e43d9f5d434e5bfc3cb83d9e56926 (diff) | |
download | chromium_src-1609d0d3a7d5b0f3777702308a440b22f1b42b59.zip chromium_src-1609d0d3a7d5b0f3777702308a440b22f1b42b59.tar.gz chromium_src-1609d0d3a7d5b0f3777702308a440b22f1b42b59.tar.bz2 |
Support PPB_Flash_ModileLocal blocking calls from background threads. This is
a temporary stopgap to allow these specific functions to be used until the
entire proxy can support threading.
There are two functions that set up and clean up the routing information in
the interface. These are necessary because the global dispatcher routing
information is not threadsafe.
When used from the main thread, the code works the same as before. When used
from a background thread, we create a sync message, send it to the I/O thread,
and block the sending thread until the reply is received. There is no handling
of other incoming blocking messages (which are impossible), and no other
Pepper functions are supported from the background thread.
TEST=manual
BUG=none
Review URL: http://codereview.chromium.org/6875009
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@81814 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/plugins')
-rw-r--r-- | webkit/plugins/ppapi/ppb_flash_file_impl.cc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/webkit/plugins/ppapi/ppb_flash_file_impl.cc b/webkit/plugins/ppapi/ppb_flash_file_impl.cc index 48e4ab0..cf657a9 100644 --- a/webkit/plugins/ppapi/ppb_flash_file_impl.cc +++ b/webkit/plugins/ppapi/ppb_flash_file_impl.cc @@ -72,6 +72,13 @@ void FreeDirContents(PP_Instance instance, PP_DirContents_Dev* contents) { namespace { +bool CreateThreadAdapterForInstance(PP_Instance instance) { + return false; // No multithreaded access allowed. +} + +void ClearThreadAdapterForInstance(PP_Instance instance) { +} + int32_t OpenModuleLocalFile(PP_Instance pp_instance, const char* path, int32_t mode, @@ -205,6 +212,8 @@ int32_t GetModuleLocalDirContents(PP_Instance pp_instance, } const PPB_Flash_File_ModuleLocal ppb_flash_file_modulelocal = { + &CreateThreadAdapterForInstance, + &ClearThreadAdapterForInstance, &OpenModuleLocalFile, &RenameModuleLocalFile, &DeleteModuleLocalFileOrDir, |