1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef PPAPI_PROXY_FLASH_CLIPBOARD_RESOURCE_H_
6 #define PPAPI_PROXY_FLASH_CLIPBOARD_RESOURCE_H_
8 #include "ppapi/proxy/connection.h"
9 #include "ppapi/proxy/plugin_resource.h"
10 #include "ppapi/shared_impl/flash_clipboard_format_registry.h"
11 #include "ppapi/thunk/ppb_flash_clipboard_api.h"
16 class FlashClipboardResource
17 : public PluginResource
,
18 public NON_EXPORTED_BASE(thunk::PPB_Flash_Clipboard_API
) {
20 FlashClipboardResource(Connection connection
, PP_Instance instance
);
21 virtual ~FlashClipboardResource();
23 // Resource implementation.
24 virtual thunk::PPB_Flash_Clipboard_API
* AsPPB_Flash_Clipboard_API() OVERRIDE
;
26 // PPB_Flash_Clipboard_API implementation.
27 virtual uint32_t RegisterCustomFormat(PP_Instance instance
,
28 const char* format_name
) OVERRIDE
;
29 virtual PP_Bool
IsFormatAvailable(PP_Instance instance
,
30 PP_Flash_Clipboard_Type clipboard_type
,
31 uint32_t format
) OVERRIDE
;
32 virtual PP_Var
ReadData(PP_Instance instance
,
33 PP_Flash_Clipboard_Type clipboard_type
,
34 uint32_t format
) OVERRIDE
;
35 virtual int32_t WriteData(PP_Instance instance
,
36 PP_Flash_Clipboard_Type clipboard_type
,
37 uint32_t data_item_count
,
38 const uint32_t formats
[],
39 const PP_Var data_items
[]) OVERRIDE
;
40 virtual PP_Bool
GetSequenceNumber(
42 PP_Flash_Clipboard_Type clipboard_type
,
43 uint64_t* sequence_number
) OVERRIDE
;
46 FlashClipboardFormatRegistry clipboard_formats_
;
48 DISALLOW_COPY_AND_ASSIGN(FlashClipboardResource
);
54 #endif // PPAPI_PROXY_FLASH_CLIPBOARD_RESOURCE_H_