diff options
-rw-r--r-- | ppapi/cpp/trusted/file_chooser_trusted.cc | 1 | ||||
-rw-r--r-- | ppapi/proxy/interface_list.cc | 1 | ||||
-rw-r--r-- | ppapi/proxy/ppb_file_chooser_proxy.cc | 12 | ||||
-rw-r--r-- | ppapi/proxy/ppb_file_chooser_proxy.h | 4 | ||||
-rw-r--r-- | ppapi/thunk/interfaces_ppb_private.h | 4 | ||||
-rw-r--r-- | ppapi/thunk/ppb_file_chooser_thunk.cc | 17 | ||||
-rw-r--r-- | webkit/plugins/ppapi/plugin_module.cc | 2 |
7 files changed, 8 insertions, 33 deletions
diff --git a/ppapi/cpp/trusted/file_chooser_trusted.cc b/ppapi/cpp/trusted/file_chooser_trusted.cc index d925518..92fec74 100644 --- a/ppapi/cpp/trusted/file_chooser_trusted.cc +++ b/ppapi/cpp/trusted/file_chooser_trusted.cc @@ -67,6 +67,7 @@ int32_t FileChooser_Trusted::Show( ChooseCallbackData0_5* data = new ChooseCallbackData0_5; data->file_chooser = pp_resource(); data->output = callback.output(); + data->original_callback = callback.pp_completion_callback(); return get_interface<PPB_FileChooserTrusted_0_5>()->ShowWithoutUserGesture( pp_resource(), diff --git a/ppapi/proxy/interface_list.cc b/ppapi/proxy/interface_list.cc index 53b8db1..6d05722 100644 --- a/ppapi/proxy/interface_list.cc +++ b/ppapi/proxy/interface_list.cc @@ -213,7 +213,6 @@ InterfaceList::InterfaceList() { // PPB (browser) interfaces. // Do not add more stuff here, they should be added to interface_list*.h // TODO(brettw) remove these. - AddPPB(PPB_FileChooser_Proxy::GetTrustedInfo()); AddPPB(PPB_Instance_Proxy::GetInfoPrivate()); AddPPB(PPB_PDF_Proxy::GetInfo()); AddPPB(PPB_Testing_Proxy::GetInfo()); diff --git a/ppapi/proxy/ppb_file_chooser_proxy.cc b/ppapi/proxy/ppb_file_chooser_proxy.cc index 298e9ae..466d0e6 100644 --- a/ppapi/proxy/ppb_file_chooser_proxy.cc +++ b/ppapi/proxy/ppb_file_chooser_proxy.cc @@ -201,18 +201,6 @@ PPB_FileChooser_Proxy::~PPB_FileChooser_Proxy() { } // static -const InterfaceProxy::Info* PPB_FileChooser_Proxy::GetTrustedInfo() { - static const Info info = { - thunk::GetPPB_FileChooser_Trusted_0_5_Thunk(), - PPB_FILECHOOSER_TRUSTED_INTERFACE_0_5, - API_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 530aec3..a0bfc0a 100644 --- a/ppapi/proxy/ppb_file_chooser_proxy.h +++ b/ppapi/proxy/ppb_file_chooser_proxy.h @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -30,8 +30,6 @@ class PPB_FileChooser_Proxy : public InterfaceProxy { explicit PPB_FileChooser_Proxy(Dispatcher* dispatcher); virtual ~PPB_FileChooser_Proxy(); - static const Info* GetTrustedInfo(); - static PP_Resource CreateProxyResource( PP_Instance instance, PP_FileChooserMode_Dev mode, diff --git a/ppapi/thunk/interfaces_ppb_private.h b/ppapi/thunk/interfaces_ppb_private.h index 39259aa..85a0842 100644 --- a/ppapi/thunk/interfaces_ppb_private.h +++ b/ppapi/thunk/interfaces_ppb_private.h @@ -23,6 +23,10 @@ PROXIED_IFACE(PPB_Instance, PPB_BROWSERFONT_TRUSTED_INTERFACE_1_0, PPB_BrowserFont_Trusted_1_0) PROXIED_IFACE(PPB_Instance, PPB_CHARSET_TRUSTED_INTERFACE_1_0, PPB_CharSet_Trusted_1_0) +PROXIED_IFACE(PPB_FileChooser, PPB_FILECHOOSER_TRUSTED_INTERFACE_0_5, + PPB_FileChooserTrusted_0_5) +PROXIED_IFACE(PPB_FileChooser, PPB_FILECHOOSER_TRUSTED_INTERFACE_0_6, + PPB_FileChooserTrusted_0_6) PROXIED_IFACE(PPB_FileRef, PPB_FILEREFPRIVATE_INTERFACE_0_1, PPB_FileRefPrivate_0_1) // This uses the FileIO API which is declared in the public stable file. diff --git a/ppapi/thunk/ppb_file_chooser_thunk.cc b/ppapi/thunk/ppb_file_chooser_thunk.cc index 4e590c7..083ffb8 100644 --- a/ppapi/thunk/ppb_file_chooser_thunk.cc +++ b/ppapi/thunk/ppb_file_chooser_thunk.cc @@ -57,19 +57,6 @@ int32_t Show(PP_Resource chooser, return enter.SetResult(enter.object()->Show(output, callback)); } - -int32_t ShowWithoutUserGesture(PP_Resource chooser, - PP_Bool save_as, - PP_Var suggested_file_name, - const PP_ArrayOutput* output, - PP_CompletionCallback callback) { - EnterResource<PPB_FileChooser_API> enter(chooser, callback, true); - if (enter.failed()) - return enter.retval(); - return enter.SetResult(enter.object()->ShowWithoutUserGesture( - save_as, suggested_file_name, *output, callback)); -} - int32_t ShowWithoutUserGesture0_5(PP_Resource chooser, PP_Bool save_as, PP_Var suggested_file_name, @@ -124,11 +111,11 @@ const PPB_FileChooser_Dev_0_6* GetPPB_FileChooser_Dev_0_6_Thunk() { return &g_ppb_file_chooser_0_6_thunk; } -const PPB_FileChooserTrusted_0_5* GetPPB_FileChooser_Trusted_0_5_Thunk() { +const PPB_FileChooserTrusted_0_5* GetPPB_FileChooserTrusted_0_5_Thunk() { return &g_ppb_file_chooser_trusted_0_5_thunk; } -const PPB_FileChooserTrusted_0_6* GetPPB_FileChooser_Trusted_0_6_Thunk() { +const PPB_FileChooserTrusted_0_6* GetPPB_FileChooserTrusted_0_6_Thunk() { return &g_ppb_file_chooser_trusted_0_6_thunk; } diff --git a/webkit/plugins/ppapi/plugin_module.cc b/webkit/plugins/ppapi/plugin_module.cc index a570a40..4cf28e8 100644 --- a/webkit/plugins/ppapi/plugin_module.cc +++ b/webkit/plugins/ppapi/plugin_module.cc @@ -310,8 +310,6 @@ const void* GetInterface(const char* name) { return ::ppapi::thunk::GetPPB_BufferTrusted_0_1_Thunk(); if (strcmp(name, PPB_CORE_INTERFACE_1_0) == 0) return &core_interface; - if (strcmp(name, PPB_FILECHOOSER_TRUSTED_INTERFACE_0_5) == 0) - return ::ppapi::thunk::GetPPB_FileChooser_Trusted_0_5_Thunk(); if (strcmp(name, PPB_FLASH_INTERFACE_11_0) == 0) return PPB_Flash_Impl::GetInterface11(); if (strcmp(name, PPB_FLASH_INTERFACE_12_0) == 0) |