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_PPB_TESTING_PROXY_H_
6 #define PPAPI_PROXY_PPB_TESTING_PROXY_H_
8 #include "base/basictypes.h"
9 #include "ppapi/c/pp_instance.h"
10 #include "ppapi/c/pp_resource.h"
11 #include "ppapi/c/private/ppb_testing_private.h"
12 #include "ppapi/proxy/interface_proxy.h"
13 #include "ppapi/shared_impl/host_resource.h"
19 struct InputEventData
;
23 class PPB_Testing_Proxy
: public InterfaceProxy
{
25 PPB_Testing_Proxy(Dispatcher
* dispatcher
);
26 virtual ~PPB_Testing_Proxy();
28 static const PPB_Testing_Private
* GetProxyInterface();
30 // InterfaceProxy implementation.
31 virtual bool OnMessageReceived(const IPC::Message
& msg
);
35 void OnMsgReadImageData(const ppapi::HostResource
& device_context_2d
,
36 const ppapi::HostResource
& image
,
37 const PP_Point
& top_left
,
39 void OnMsgRunMessageLoop(PP_Instance instance
);
40 void OnMsgQuitMessageLoop(PP_Instance instance
);
41 void OnMsgGetLiveObjectsForInstance(PP_Instance instance
, uint32_t* result
);
42 void OnMsgPostPowerSaverStatus(PP_Instance instance
);
43 void OnMsgSubscribeToPowerSaverNotifications(PP_Instance instance
);
44 void OnMsgSimulateInputEvent(PP_Instance instance
,
45 const ppapi::InputEventData
& input_event
);
46 void OnMsgSetMinimumArrayBufferSizeForShmem(uint32_t threshold
);
48 // When this proxy is in the host side, this value caches the interface
49 // pointer so we don't have to retrieve it from the dispatcher each time.
50 // In the plugin, this value is always NULL.
51 const PPB_Testing_Private
* ppb_testing_impl_
;
53 DISALLOW_COPY_AND_ASSIGN(PPB_Testing_Proxy
);
59 #endif // PPAPI_PROXY_PPB_TESTING_PROXY_H_