summaryrefslogtreecommitdiffstats
path: root/chrome/renderer/pepper_plugin_delegate_impl.h
diff options
context:
space:
mode:
authordumi@chromium.org <dumi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-10 04:06:24 +0000
committerdumi@chromium.org <dumi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-10 04:06:24 +0000
commit27a9ef35b1d9b91dbd5e70e33c808bf05431c4dc (patch)
tree1bed42107533d6e15328ed585504ce5ac4bfe1ea /chrome/renderer/pepper_plugin_delegate_impl.h
parent3fb43ed1ad7bcfeb686aa48e296ffbc639b35ad7 (diff)
downloadchromium_src-27a9ef35b1d9b91dbd5e70e33c808bf05431c4dc.zip
chromium_src-27a9ef35b1d9b91dbd5e70e33c808bf05431c4dc.tar.gz
chromium_src-27a9ef35b1d9b91dbd5e70e33c808bf05431c4dc.tar.bz2
Implement pepper::FileIO.
TEST=none BUG=none Review URL: http://codereview.chromium.org/3329014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@59045 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer/pepper_plugin_delegate_impl.h')
-rw-r--r--chrome/renderer/pepper_plugin_delegate_impl.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/chrome/renderer/pepper_plugin_delegate_impl.h b/chrome/renderer/pepper_plugin_delegate_impl.h
index 1930fa8..ebc19ee 100644
--- a/chrome/renderer/pepper_plugin_delegate_impl.h
+++ b/chrome/renderer/pepper_plugin_delegate_impl.h
@@ -9,14 +9,17 @@
#include <set>
#include "base/basictypes.h"
+#include "base/id_map.h"
#include "base/weak_ptr.h"
#include "third_party/ppapi/c/pp_errors.h"
#include "webkit/glue/plugins/pepper_plugin_delegate.h"
#include "webkit/glue/plugins/pepper_plugin_instance.h"
+class FilePath;
class RenderView;
namespace pepper {
+class FileIO;
class PluginInstance;
}
@@ -37,6 +40,11 @@ class PepperPluginDelegateImpl
void ViewInitiatedPaint();
void ViewFlushedPaint();
+ // Called by RenderView when ViewMsg_AsyncOpenFile_ACK.
+ void OnAsyncFileOpened(base::PlatformFileError error_code,
+ base::PlatformFile file,
+ int message_id);
+
// pepper::PluginDelegate implementation.
virtual void InstanceCreated(pepper::PluginInstance* instance);
virtual void InstanceDeleted(pepper::PluginInstance* instance);
@@ -55,6 +63,10 @@ class PepperPluginDelegateImpl
virtual bool RunFileChooser(
const WebKit::WebFileChooserParams& params,
WebKit::WebFileChooserCompletion* chooser_completion);
+ virtual bool AsyncOpenFile(const FilePath& path,
+ int flags,
+ AsyncOpenFileCallback* callback);
+ virtual scoped_refptr<base::MessageLoopProxy> GetFileThreadMessageLoopProxy();
private:
// Pointer to the RenderView that owns us.
@@ -62,6 +74,9 @@ class PepperPluginDelegateImpl
std::set<pepper::PluginInstance*> active_instances_;
+ int id_generator_;
+ IDMap<AsyncOpenFileCallback> messages_waiting_replies_;
+
DISALLOW_COPY_AND_ASSIGN(PepperPluginDelegateImpl);
};