diff options
author | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-04-25 19:26:40 +0000 |
---|---|---|
committer | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-04-25 19:26:40 +0000 |
commit | d1e33ca1b734b9a4a33ac702554e8be129a26f2a (patch) | |
tree | da7e529be1d7794f10b29e8c401a406b31073597 /ppapi/thunk | |
parent | ab5918a6b6d3d19122e0b90fae1155938043fdf0 (diff) | |
download | chromium_src-d1e33ca1b734b9a4a33ac702554e8be129a26f2a.zip chromium_src-d1e33ca1b734b9a4a33ac702554e8be129a26f2a.tar.gz chromium_src-d1e33ca1b734b9a4a33ac702554e8be129a26f2a.tar.bz2 |
Move the FlashClipboard API into the Flash one.
This allows us to delete the separate proxy files for this.
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com/10163012
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@133955 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/thunk')
-rw-r--r-- | ppapi/thunk/enter.cc | 7 | ||||
-rw-r--r-- | ppapi/thunk/enter.h | 7 | ||||
-rw-r--r-- | ppapi/thunk/interfaces_ppb_private_flash.h | 10 | ||||
-rw-r--r-- | ppapi/thunk/ppb_flash_api.h | 15 | ||||
-rw-r--r-- | ppapi/thunk/ppb_flash_clipboard_api.h | 36 | ||||
-rw-r--r-- | ppapi/thunk/ppb_flash_clipboard_thunk.cc | 23 |
6 files changed, 49 insertions, 49 deletions
diff --git a/ppapi/thunk/enter.cc b/ppapi/thunk/enter.cc index d8d4291..6b2208a 100644 --- a/ppapi/thunk/enter.cc +++ b/ppapi/thunk/enter.cc @@ -163,5 +163,12 @@ EnterInstance::EnterInstance(PP_Instance instance, EnterInstance::~EnterInstance() { } +EnterInstanceNoLock::EnterInstanceNoLock(PP_Instance instance) + : EnterFunctionNoLock<PPB_Instance_FunctionAPI>(instance, true) { +} + +EnterInstanceNoLock::~EnterInstanceNoLock() { +} + } // namespace thunk } // namespace ppapi diff --git a/ppapi/thunk/enter.h b/ppapi/thunk/enter.h index 4172ce0..5c69acf 100644 --- a/ppapi/thunk/enter.h +++ b/ppapi/thunk/enter.h @@ -262,6 +262,13 @@ class PPAPI_THUNK_EXPORT EnterInstance ~EnterInstance(); }; +class PPAPI_THUNK_EXPORT EnterInstanceNoLock + : public EnterFunctionNoLock<PPB_Instance_FunctionAPI> { + public: + EnterInstanceNoLock(PP_Instance instance); + ~EnterInstanceNoLock(); +}; + } // namespace thunk } // namespace ppapi diff --git a/ppapi/thunk/interfaces_ppb_private_flash.h b/ppapi/thunk/interfaces_ppb_private_flash.h index 6d9fa82..1a96fbc 100644 --- a/ppapi/thunk/interfaces_ppb_private_flash.h +++ b/ppapi/thunk/interfaces_ppb_private_flash.h @@ -22,4 +22,14 @@ PROXIED_IFACE(PPB_Flash, PPB_FLASH_INTERFACE_12_2, PPB_Flash_12_2) +PROXIED_IFACE(PPB_Flash, + PPB_FLASH_CLIPBOARD_INTERFACE_3_LEGACY, + PPB_Flash_Clipboard_3_0) +PROXIED_IFACE(PPB_Flash, + PPB_FLASH_CLIPBOARD_INTERFACE_3_0, + PPB_Flash_Clipboard_3_0) +PROXIED_IFACE(PPB_Flash, + PPB_FLASH_CLIPBOARD_INTERFACE_4_0, + PPB_Flash_Clipboard_4_0) + #include "ppapi/thunk/interfaces_postamble.h" diff --git a/ppapi/thunk/ppb_flash_api.h b/ppapi/thunk/ppb_flash_api.h index eacc9e8..b54bba3 100644 --- a/ppapi/thunk/ppb_flash_api.h +++ b/ppapi/thunk/ppb_flash_api.h @@ -6,6 +6,7 @@ #define PPAPI_THUNK_PPB_FLASH_API_H_ #include "ppapi/c/private/ppb_flash.h" +#include "ppapi/c/private/ppb_flash_clipboard.h" #include "ppapi/thunk/ppapi_thunk_export.h" namespace ppapi { @@ -42,6 +43,20 @@ class PPAPI_THUNK_EXPORT PPB_Flash_API { virtual void UpdateActivity(PP_Instance instance) = 0; virtual PP_Var GetDeviceID(PP_Instance instance) = 0; + // FlashClipboard. + virtual PP_Bool IsClipboardFormatAvailable( + PP_Instance instance, + PP_Flash_Clipboard_Type clipboard_type, + PP_Flash_Clipboard_Format format) = 0; + virtual PP_Var ReadClipboardData(PP_Instance instance, + PP_Flash_Clipboard_Type clipboard_type, + PP_Flash_Clipboard_Format format) = 0; + virtual int32_t WriteClipboardData(PP_Instance instance, + PP_Flash_Clipboard_Type clipboard_type, + uint32_t data_item_count, + const PP_Flash_Clipboard_Format formats[], + const PP_Var data_items[]) = 0; + // FlashFullscreen. virtual PP_Bool FlashIsFullscreen(PP_Instance instance) = 0; virtual PP_Bool FlashSetFullscreen(PP_Instance instance, diff --git a/ppapi/thunk/ppb_flash_clipboard_api.h b/ppapi/thunk/ppb_flash_clipboard_api.h deleted file mode 100644 index 02155e1..0000000 --- a/ppapi/thunk/ppb_flash_clipboard_api.h +++ /dev/null @@ -1,36 +0,0 @@ -// 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. - -#ifndef PPAPI_THUNK_PPB_FLASH_CLIPBOARD_API_H_ -#define PPAPI_THUNK_PPB_FLASH_CLIPBOARD_API_H_ - -#include "ppapi/c/private/ppb_flash_clipboard.h" -#include "ppapi/shared_impl/api_id.h" - -namespace ppapi { -namespace thunk { - -class PPB_Flash_Clipboard_FunctionAPI { - public: - virtual ~PPB_Flash_Clipboard_FunctionAPI() {} - - virtual PP_Bool IsFormatAvailable(PP_Instance instance, - PP_Flash_Clipboard_Type clipboard_type, - PP_Flash_Clipboard_Format format) = 0; - virtual PP_Var ReadData(PP_Instance instance, - PP_Flash_Clipboard_Type clipboard_type, - PP_Flash_Clipboard_Format format) = 0; - virtual int32_t WriteData(PP_Instance instance, - PP_Flash_Clipboard_Type clipboard_type, - uint32_t data_item_count, - const PP_Flash_Clipboard_Format formats[], - const PP_Var data_items[]) = 0; - - static const ApiID kApiID = API_ID_PPB_FLASH_CLIPBOARD; -}; - -} // namespace thunk -} // namespace ppapi - -#endif // PPAPI_THUNK_PPB_FLASH_CLIPBOARD_API_H_ diff --git a/ppapi/thunk/ppb_flash_clipboard_thunk.cc b/ppapi/thunk/ppb_flash_clipboard_thunk.cc index efc7307..084b937 100644 --- a/ppapi/thunk/ppb_flash_clipboard_thunk.cc +++ b/ppapi/thunk/ppb_flash_clipboard_thunk.cc @@ -6,31 +6,31 @@ #include "ppapi/c/private/ppb_flash_clipboard.h" #include "ppapi/thunk/enter.h" #include "ppapi/thunk/thunk.h" -#include "ppapi/thunk/ppb_flash_clipboard_api.h" +#include "ppapi/thunk/ppb_flash_api.h" namespace ppapi { namespace thunk { namespace { -typedef EnterFunction<PPB_Flash_Clipboard_FunctionAPI> EnterFlashClipboard; - PP_Bool IsFormatAvailable(PP_Instance instance, PP_Flash_Clipboard_Type clipboard_type, PP_Flash_Clipboard_Format format) { - EnterFlashClipboard enter(instance, true); + EnterInstance enter(instance); if (enter.failed()) return PP_FALSE; - return enter.functions()->IsFormatAvailable(instance, clipboard_type, format); + return enter.functions()->GetFlashAPI()->IsClipboardFormatAvailable( + instance, clipboard_type, format); } PP_Var ReadData(PP_Instance instance, PP_Flash_Clipboard_Type clipboard_type, PP_Flash_Clipboard_Format format) { - EnterFlashClipboard enter(instance, true); + EnterInstance enter(instance); if (enter.failed()) return PP_MakeUndefined(); - return enter.functions()->ReadData(instance, clipboard_type, format); + return enter.functions()->GetFlashAPI()->ReadClipboardData( + instance, clipboard_type, format); } int32_t WriteData(PP_Instance instance, @@ -38,14 +38,11 @@ int32_t WriteData(PP_Instance instance, uint32_t data_item_count, const PP_Flash_Clipboard_Format formats[], const PP_Var data_items[]) { - EnterFlashClipboard enter(instance, true); + EnterInstance enter(instance); if (enter.failed()) return enter.retval(); - return enter.functions()->WriteData(instance, - clipboard_type, - data_item_count, - formats, - data_items); + return enter.functions()->GetFlashAPI()->WriteClipboardData( + instance, clipboard_type, data_item_count, formats, data_items); } PP_Var ReadPlainText(PP_Instance instance, |