summaryrefslogtreecommitdiffstats
path: root/ppapi
diff options
context:
space:
mode:
authorbbudge@google.com <bbudge@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-13 22:26:46 +0000
committerbbudge@google.com <bbudge@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-13 22:26:46 +0000
commit2650164251ab77ea9a348952e16323d493eee039 (patch)
tree62a5f44373c943ca8e43d317378ca0fdca83a97c /ppapi
parent8b280303f86249ce8d13916fcda774a3129ac9ac (diff)
downloadchromium_src-2650164251ab77ea9a348952e16323d493eee039.zip
chromium_src-2650164251ab77ea9a348952e16323d493eee039.tar.gz
chromium_src-2650164251ab77ea9a348952e16323d493eee039.tar.bz2
Proxy PPB_FileChooserTrusted for Flash.
BUG=none TEST=none Review URL: http://codereview.chromium.org/8273016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@105391 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi')
-rw-r--r--ppapi/proxy/interface_list.cc1
-rw-r--r--ppapi/proxy/ppb_file_chooser_proxy.cc20
-rw-r--r--ppapi/proxy/ppb_file_chooser_proxy.h4
3 files changed, 24 insertions, 1 deletions
diff --git a/ppapi/proxy/interface_list.cc b/ppapi/proxy/interface_list.cc
index c88ccd1..1713ebd 100644
--- a/ppapi/proxy/interface_list.cc
+++ b/ppapi/proxy/interface_list.cc
@@ -174,6 +174,7 @@ InterfaceList::InterfaceList() {
GetPPB_Var_Interface());
// PPB (browser) interfaces.
+ AddPPB(PPB_FileChooser_Proxy::GetTrustedInfo());
AddPPB(PPB_Flash_Clipboard_Proxy::GetInfo());
AddPPB(PPB_Flash_File_FileRef_Proxy::GetInfo());
AddPPB(PPB_Flash_File_ModuleLocal_Proxy::GetInfo());
diff --git a/ppapi/proxy/ppb_file_chooser_proxy.cc b/ppapi/proxy/ppb_file_chooser_proxy.cc
index d128439..261f9f3 100644
--- a/ppapi/proxy/ppb_file_chooser_proxy.cc
+++ b/ppapi/proxy/ppb_file_chooser_proxy.cc
@@ -10,6 +10,7 @@
#include "ppapi/c/dev/ppb_file_chooser_dev.h"
#include "ppapi/c/pp_errors.h"
#include "ppapi/c/private/ppb_proxy_private.h"
+#include "ppapi/c/trusted/ppb_file_chooser_trusted.h"
#include "ppapi/proxy/enter_proxy.h"
#include "ppapi/proxy/host_dispatcher.h"
#include "ppapi/proxy/plugin_dispatcher.h"
@@ -25,6 +26,11 @@ using ppapi::thunk::PPB_FileChooser_API;
namespace ppapi {
namespace proxy {
+namespace {
+InterfaceProxy* CreateFileChooserProxy(Dispatcher* dispatcher) {
+ return new PPB_FileChooser_Proxy(dispatcher);
+}
+
class FileChooser : public Resource,
public PPB_FileChooser_API {
public:
@@ -150,6 +156,8 @@ void FileChooser::ChooseComplete(
// DANGER: May delete |this|!
}
+} // namespace
+
PPB_FileChooser_Proxy::PPB_FileChooser_Proxy(Dispatcher* dispatcher)
: InterfaceProxy(dispatcher),
callback_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)) {
@@ -159,6 +167,18 @@ PPB_FileChooser_Proxy::~PPB_FileChooser_Proxy() {
}
// static
+const InterfaceProxy::Info* PPB_FileChooser_Proxy::GetTrustedInfo() {
+ static const Info info = {
+ thunk::GetPPB_FileChooser_Trusted_Thunk(),
+ PPB_FILECHOOSER_TRUSTED_INTERFACE,
+ INTERFACE_ID_NONE, // FILE_CHOOSER is the canonical one.
+ false,
+ &CreateFileChooserProxy
+ };
+ return &info;
+}
+
+// static
PP_Resource PPB_FileChooser_Proxy::CreateProxyResource(
PP_Instance instance,
PP_FileChooserMode_Dev mode,
diff --git a/ppapi/proxy/ppb_file_chooser_proxy.h b/ppapi/proxy/ppb_file_chooser_proxy.h
index c7e2f48..51cac53 100644
--- a/ppapi/proxy/ppb_file_chooser_proxy.h
+++ b/ppapi/proxy/ppb_file_chooser_proxy.h
@@ -16,11 +16,11 @@
#include "ppapi/thunk/ppb_file_chooser_api.h"
struct PPB_FileChooser_Dev;
+struct PPB_FileChooserTrusted;
namespace ppapi {
class HostResource;
-struct PPB_FileChooserTrusted;
struct PPB_FileRef_CreateInfo;
namespace proxy {
@@ -32,6 +32,8 @@ class PPB_FileChooser_Proxy : public InterfaceProxy {
PPB_FileChooser_Proxy(Dispatcher* dispatcher);
virtual ~PPB_FileChooser_Proxy();
+ static const Info* GetTrustedInfo();
+
static PP_Resource CreateProxyResource(
PP_Instance instance,
PP_FileChooserMode_Dev mode,