[email protected] | 4614f19 | 2011-01-21 00:26:43 | [diff] [blame^] | 1 | // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
[email protected] | 1054c07 | 2010-11-05 22:52:48 | [diff] [blame] | 2 | // Use of this source code is governed by a BSD-style license that can be |
3 | // found in the LICENSE file. | ||||
4 | |||||
5 | #ifndef PPAPI_PROXY_PPB_TESTING_PROXY_H_ | ||||
6 | #define PPAPI_PROXY_PPB_TESTING_PROXY_H_ | ||||
7 | |||||
8 | #include "base/basictypes.h" | ||||
[email protected] | 4614f19 | 2011-01-21 00:26:43 | [diff] [blame^] | 9 | #include "ppapi/c/pp_instance.h" |
[email protected] | 1054c07 | 2010-11-05 22:52:48 | [diff] [blame] | 10 | #include "ppapi/c/pp_resource.h" |
11 | #include "ppapi/proxy/interface_proxy.h" | ||||
12 | |||||
13 | struct PP_Point; | ||||
14 | struct PPB_Testing_Dev; | ||||
15 | |||||
16 | namespace pp { | ||||
17 | namespace proxy { | ||||
18 | |||||
19 | class PPB_Testing_Proxy : public InterfaceProxy { | ||||
20 | public: | ||||
21 | PPB_Testing_Proxy(Dispatcher* dispatcher, const void* target_interface); | ||||
22 | virtual ~PPB_Testing_Proxy(); | ||||
23 | |||||
24 | const PPB_Testing_Dev* ppb_testing_target() const { | ||||
25 | return static_cast<const PPB_Testing_Dev*>(target_interface()); | ||||
26 | } | ||||
27 | |||||
28 | // InterfaceProxy implementation. | ||||
29 | virtual const void* GetSourceInterface() const; | ||||
30 | virtual InterfaceID GetInterfaceId() const; | ||||
[email protected] | a95986a8 | 2010-12-24 06:19:28 | [diff] [blame] | 31 | virtual bool OnMessageReceived(const IPC::Message& msg); |
[email protected] | 1054c07 | 2010-11-05 22:52:48 | [diff] [blame] | 32 | |
33 | private: | ||||
34 | // Message handlers. | ||||
35 | void OnMsgReadImageData(PP_Resource device_context_2d, | ||||
36 | PP_Resource image, | ||||
37 | const PP_Point& top_left, | ||||
[email protected] | 19d2b01 | 2010-11-08 16:32:18 | [diff] [blame] | 38 | PP_Bool* result); |
[email protected] | 1054c07 | 2010-11-05 22:52:48 | [diff] [blame] | 39 | void OnMsgRunMessageLoop(bool* dummy); |
40 | void OnMsgQuitMessageLoop(); | ||||
[email protected] | 4614f19 | 2011-01-21 00:26:43 | [diff] [blame^] | 41 | void OnMsgGetLiveObjectsForInstance(PP_Instance instance, uint32_t* result); |
[email protected] | 1054c07 | 2010-11-05 22:52:48 | [diff] [blame] | 42 | |
43 | DISALLOW_COPY_AND_ASSIGN(PPB_Testing_Proxy); | ||||
44 | }; | ||||
45 | |||||
46 | } // namespace proxy | ||||
47 | } // namespace pp | ||||
48 | |||||
49 | #endif // PPAPI_PROXY_PPB_TESTING_PROXY_H_ |