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