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_PPB_FLASH_PROXY_H_ | 5 #ifndef PPAPI_PROXY_PPB_FLASH_PROXY_H_ |
6 #define PPAPI_PROXY_PPB_FLASH_PROXY_H_ | 6 #define PPAPI_PROXY_PPB_FLASH_PROXY_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
12 #include "ipc/ipc_platform_file.h" | 12 #include "ipc/ipc_platform_file.h" |
13 #include "ppapi/c/pp_bool.h" | 13 #include "ppapi/c/pp_bool.h" |
14 #include "ppapi/c/pp_instance.h" | 14 #include "ppapi/c/pp_instance.h" |
15 #include "ppapi/c/pp_module.h" | 15 #include "ppapi/c/pp_module.h" |
16 #include "ppapi/c/pp_time.h" | 16 #include "ppapi/c/pp_time.h" |
17 #include "ppapi/c/private/ppb_flash.h" | 17 #include "ppapi/c/private/ppb_flash.h" |
18 #include "ppapi/proxy/interface_proxy.h" | 18 #include "ppapi/proxy/interface_proxy.h" |
| 19 #include "ppapi/proxy/serialized_var.h" |
19 #include "ppapi/shared_impl/host_resource.h" | 20 #include "ppapi/shared_impl/host_resource.h" |
20 #include "ppapi/thunk/ppb_flash_api.h" | 21 #include "ppapi/thunk/ppb_flash_api.h" |
21 | 22 |
22 namespace ppapi { | 23 namespace ppapi { |
23 | 24 |
24 struct PPB_URLRequestInfo_Data; | 25 struct PPB_URLRequestInfo_Data; |
25 | 26 |
26 namespace proxy { | 27 namespace proxy { |
27 | 28 |
28 struct PPBFlash_DrawGlyphs_Params; | 29 struct PPBFlash_DrawGlyphs_Params; |
(...skipping 29 matching lines...) Expand all Loading... |
58 PP_Bool from_user_action) OVERRIDE; | 59 PP_Bool from_user_action) OVERRIDE; |
59 virtual void RunMessageLoop(PP_Instance instance) OVERRIDE; | 60 virtual void RunMessageLoop(PP_Instance instance) OVERRIDE; |
60 virtual void QuitMessageLoop(PP_Instance instance) OVERRIDE; | 61 virtual void QuitMessageLoop(PP_Instance instance) OVERRIDE; |
61 virtual double GetLocalTimeZoneOffset(PP_Instance instance, | 62 virtual double GetLocalTimeZoneOffset(PP_Instance instance, |
62 PP_Time t) OVERRIDE; | 63 PP_Time t) OVERRIDE; |
63 virtual PP_Bool IsRectTopmost(PP_Instance instance, | 64 virtual PP_Bool IsRectTopmost(PP_Instance instance, |
64 const PP_Rect* rect) OVERRIDE; | 65 const PP_Rect* rect) OVERRIDE; |
65 virtual int32_t InvokePrinting(PP_Instance instance) OVERRIDE; | 66 virtual int32_t InvokePrinting(PP_Instance instance) OVERRIDE; |
66 virtual void UpdateActivity(PP_Instance instance) OVERRIDE; | 67 virtual void UpdateActivity(PP_Instance instance) OVERRIDE; |
67 virtual PP_Var GetDeviceID(PP_Instance instance) OVERRIDE; | 68 virtual PP_Var GetDeviceID(PP_Instance instance) OVERRIDE; |
| 69 virtual PP_Bool IsClipboardFormatAvailable( |
| 70 PP_Instance instance, |
| 71 PP_Flash_Clipboard_Type clipboard_type, |
| 72 PP_Flash_Clipboard_Format format) OVERRIDE; |
| 73 virtual PP_Var ReadClipboardData(PP_Instance instance, |
| 74 PP_Flash_Clipboard_Type clipboard_type, |
| 75 PP_Flash_Clipboard_Format format) OVERRIDE; |
| 76 virtual int32_t WriteClipboardData(PP_Instance instance, |
| 77 PP_Flash_Clipboard_Type clipboard_type, |
| 78 uint32_t data_item_count, |
| 79 const PP_Flash_Clipboard_Format formats[], |
| 80 const PP_Var data_items[]) OVERRIDE; |
68 virtual PP_Bool FlashIsFullscreen(PP_Instance instance) OVERRIDE; | 81 virtual PP_Bool FlashIsFullscreen(PP_Instance instance) OVERRIDE; |
69 virtual PP_Bool FlashSetFullscreen(PP_Instance instance, | 82 virtual PP_Bool FlashSetFullscreen(PP_Instance instance, |
70 PP_Bool fullscreen) OVERRIDE; | 83 PP_Bool fullscreen) OVERRIDE; |
71 virtual PP_Bool FlashGetScreenSize(PP_Instance instance, | 84 virtual PP_Bool FlashGetScreenSize(PP_Instance instance, |
72 PP_Size* size) OVERRIDE; | 85 PP_Size* size) OVERRIDE; |
73 | 86 |
74 static const ApiID kApiID = API_ID_PPB_FLASH; | 87 static const ApiID kApiID = API_ID_PPB_FLASH; |
75 | 88 |
76 private: | 89 private: |
77 // Message handlers. | 90 // Message handlers. |
78 void OnHostMsgSetInstanceAlwaysOnTop(PP_Instance instance, | 91 void OnHostMsgSetInstanceAlwaysOnTop(PP_Instance instance, |
79 PP_Bool on_top); | 92 PP_Bool on_top); |
80 void OnHostMsgDrawGlyphs(const PPBFlash_DrawGlyphs_Params& params, | 93 void OnHostMsgDrawGlyphs(PP_Instance instance, |
| 94 const PPBFlash_DrawGlyphs_Params& params, |
81 PP_Bool* result); | 95 PP_Bool* result); |
82 void OnHostMsgGetProxyForURL(PP_Instance instance, | 96 void OnHostMsgGetProxyForURL(PP_Instance instance, |
83 const std::string& url, | 97 const std::string& url, |
84 SerializedVarReturnValue result); | 98 SerializedVarReturnValue result); |
85 void OnHostMsgNavigate(PP_Instance instance, | 99 void OnHostMsgNavigate(PP_Instance instance, |
86 const PPB_URLRequestInfo_Data& data, | 100 const PPB_URLRequestInfo_Data& data, |
87 const std::string& target, | 101 const std::string& target, |
88 PP_Bool from_user_action, | 102 PP_Bool from_user_action, |
89 int32_t* result); | 103 int32_t* result); |
90 void OnHostMsgRunMessageLoop(PP_Instance instance); | 104 void OnHostMsgRunMessageLoop(PP_Instance instance); |
91 void OnHostMsgQuitMessageLoop(PP_Instance instance); | 105 void OnHostMsgQuitMessageLoop(PP_Instance instance); |
92 void OnHostMsgGetLocalTimeZoneOffset(PP_Instance instance, PP_Time t, | 106 void OnHostMsgGetLocalTimeZoneOffset(PP_Instance instance, PP_Time t, |
93 double* result); | 107 double* result); |
94 void OnHostMsgIsRectTopmost(PP_Instance instance, | 108 void OnHostMsgIsRectTopmost(PP_Instance instance, |
95 PP_Rect rect, | 109 PP_Rect rect, |
96 PP_Bool* result); | 110 PP_Bool* result); |
97 void OnHostMsgFlashSetFullscreen(PP_Instance instance, | 111 void OnHostMsgFlashSetFullscreen(PP_Instance instance, |
98 PP_Bool fullscreen, | 112 PP_Bool fullscreen, |
99 PP_Bool* result); | 113 PP_Bool* result); |
100 void OnHostMsgFlashGetScreenSize(PP_Instance instance, | 114 void OnHostMsgFlashGetScreenSize(PP_Instance instance, |
101 PP_Bool* result, | 115 PP_Bool* result, |
102 PP_Size* size); | 116 PP_Size* size); |
103 | 117 void OnHostMsgIsClipboardFormatAvailable(PP_Instance instance, |
104 // When this proxy is in the host side, this value caches the interface | 118 int clipboard_type, |
105 // pointer so we don't have to retrieve it from the dispatcher each time. | 119 int format, |
106 // In the plugin, this value is always NULL. | 120 bool* result); |
107 const PPB_Flash* ppb_flash_impl_; | 121 void OnHostMsgReadClipboardData(PP_Instance instance, |
| 122 int clipboard_type, |
| 123 int format, |
| 124 SerializedVarReturnValue result); |
| 125 void OnHostMsgWriteClipboardData(PP_Instance instance, |
| 126 int clipboard_type, |
| 127 const std::vector<int>& formats, |
| 128 SerializedVarVectorReceiveInput data_items); |
108 | 129 |
109 DISALLOW_COPY_AND_ASSIGN(PPB_Flash_Proxy); | 130 DISALLOW_COPY_AND_ASSIGN(PPB_Flash_Proxy); |
110 }; | 131 }; |
111 | 132 |
112 } // namespace proxy | 133 } // namespace proxy |
113 } // namespace ppapi | 134 } // namespace ppapi |
114 | 135 |
115 #endif // PPAPI_PROXY_PPB_FLASH_PROXY_H_ | 136 #endif // PPAPI_PROXY_PPB_FLASH_PROXY_H_ |
OLD | NEW |