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/shared_impl | |
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/shared_impl')
-rw-r--r-- | ppapi/shared_impl/api_id.h | 1 | ||||
-rw-r--r-- | ppapi/shared_impl/function_group_base.h | 1 | ||||
-rw-r--r-- | ppapi/shared_impl/ppb_flash_shared.cc | 31 | ||||
-rw-r--r-- | ppapi/shared_impl/ppb_flash_shared.h | 30 |
4 files changed, 61 insertions, 2 deletions
diff --git a/ppapi/shared_impl/api_id.h b/ppapi/shared_impl/api_id.h index 8d02e59..be4be56 100644 --- a/ppapi/shared_impl/api_id.h +++ b/ppapi/shared_impl/api_id.h @@ -25,7 +25,6 @@ enum ApiID { API_ID_PPB_FILE_REF, API_ID_PPB_FILE_SYSTEM, API_ID_PPB_FLASH, - API_ID_PPB_FLASH_CLIPBOARD, API_ID_PPB_FLASH_FILE_FILEREF, API_ID_PPB_FLASH_FILE_MODULELOCAL, API_ID_PPB_FLASH_MENU, diff --git a/ppapi/shared_impl/function_group_base.h b/ppapi/shared_impl/function_group_base.h index bbf149a..e09b893 100644 --- a/ppapi/shared_impl/function_group_base.h +++ b/ppapi/shared_impl/function_group_base.h @@ -12,7 +12,6 @@ #define FOR_ALL_PPAPI_FUNCTION_APIS(F) \ F(PPB_CharSet_FunctionAPI) \ F(PPB_CursorControl_FunctionAPI) \ - F(PPB_Flash_Clipboard_FunctionAPI) \ F(PPB_Font_FunctionAPI) \ F(PPB_Fullscreen_FunctionAPI) \ F(PPB_Instance_FunctionAPI) \ diff --git a/ppapi/shared_impl/ppb_flash_shared.cc b/ppapi/shared_impl/ppb_flash_shared.cc new file mode 100644 index 0000000..c0504bf --- /dev/null +++ b/ppapi/shared_impl/ppb_flash_shared.cc @@ -0,0 +1,31 @@ +// 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. + +#include "ppapi/shared_impl/ppb_flash_shared.h" + +namespace ppapi { + +PPB_Flash_Shared::PPB_Flash_Shared() { +} + +PPB_Flash_Shared::~PPB_Flash_Shared() { +} + +// static +bool PPB_Flash_Shared::IsValidClipboardType( + PP_Flash_Clipboard_Type clipboard_type) { + return clipboard_type == PP_FLASH_CLIPBOARD_TYPE_STANDARD || + clipboard_type == PP_FLASH_CLIPBOARD_TYPE_SELECTION; +} + +// static +bool PPB_Flash_Shared::IsValidClipboardFormat( + PP_Flash_Clipboard_Format format) { + // Purposely excludes |PP_FLASH_CLIPBOARD_FORMAT_INVALID|. + return format == PP_FLASH_CLIPBOARD_FORMAT_PLAINTEXT || + format == PP_FLASH_CLIPBOARD_FORMAT_HTML || + format == PP_FLASH_CLIPBOARD_FORMAT_RTF; +} + +} // namespace ppapi diff --git a/ppapi/shared_impl/ppb_flash_shared.h b/ppapi/shared_impl/ppb_flash_shared.h new file mode 100644 index 0000000..b7de3bd --- /dev/null +++ b/ppapi/shared_impl/ppb_flash_shared.h @@ -0,0 +1,30 @@ +// 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_SHARED_IMPL_PPB_FLASH_SHARED_H_ +#define PPAPI_SHARED_IMPL_PPB_FLASH_SHARED_H_ + +#include "base/basictypes.h" +#include "base/compiler_specific.h" +#include "ppapi/shared_impl/ppapi_shared_export.h" +#include "ppapi/thunk/ppb_flash_api.h" + +namespace ppapi { + +class PPAPI_SHARED_EXPORT PPB_Flash_Shared : public thunk::PPB_Flash_API { + public: + PPB_Flash_Shared(); + virtual ~PPB_Flash_Shared(); + + protected: + static bool IsValidClipboardType(PP_Flash_Clipboard_Type clipboard_type); + static bool IsValidClipboardFormat(PP_Flash_Clipboard_Format format); + + private: + DISALLOW_COPY_AND_ASSIGN(PPB_Flash_Shared); +}; + +} // namespace ppapi + +#endif // PPAPI_SHARED_IMPL_PPB_FLASH_SHARED_H_ |