blob: 7640291bfb8ac70fc139383878fb67a3f57288b1 [file] [log] [blame]
[email protected]256513872012-01-05 15:41:521// Copyright (c) 2012 The Chromium Authors. All rights reserved.
[email protected]1054c072010-11-05 22:52:482// 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]4614f192011-01-21 00:26:439#include "ppapi/c/pp_instance.h"
[email protected]1054c072010-11-05 22:52:4810#include "ppapi/c/pp_resource.h"
[email protected]7310b162013-11-25 22:39:1511#include "ppapi/c/private/ppb_testing_private.h"
[email protected]1054c072010-11-05 22:52:4812#include "ppapi/proxy/interface_proxy.h"
[email protected]be0a84b2011-08-13 04:18:4413#include "ppapi/shared_impl/host_resource.h"
[email protected]1054c072010-11-05 22:52:4814
15struct PP_Point;
[email protected]1054c072010-11-05 22:52:4816
[email protected]4d2efd22011-08-18 21:58:0217namespace ppapi {
[email protected]ed33e2e2011-11-20 21:18:0718
19struct InputEventData;
20
[email protected]1054c072010-11-05 22:52:4821namespace proxy {
22
23class PPB_Testing_Proxy : public InterfaceProxy {
24 public:
[email protected]5c966022011-09-13 18:09:3725 PPB_Testing_Proxy(Dispatcher* dispatcher);
[email protected]1054c072010-11-05 22:52:4826 virtual ~PPB_Testing_Proxy();
27
[email protected]637fc4cd2013-12-06 22:08:1528 static const PPB_Testing_Private* GetProxyInterface();
[email protected]465faa22011-02-08 16:31:4629
[email protected]1054c072010-11-05 22:52:4830 // InterfaceProxy implementation.
[email protected]a95986a82010-12-24 06:19:2831 virtual bool OnMessageReceived(const IPC::Message& msg);
[email protected]1054c072010-11-05 22:52:4832
33 private:
34 // Message handlers.
[email protected]be0a84b2011-08-13 04:18:4435 void OnMsgReadImageData(const ppapi::HostResource& device_context_2d,
36 const ppapi::HostResource& image,
[email protected]1054c072010-11-05 22:52:4837 const PP_Point& top_left,
[email protected]19d2b012010-11-08 16:32:1838 PP_Bool* result);
[email protected]7358d572011-02-15 18:44:4039 void OnMsgRunMessageLoop(PP_Instance instance);
40 void OnMsgQuitMessageLoop(PP_Instance instance);
[email protected]4614f192011-01-21 00:26:4341 void OnMsgGetLiveObjectsForInstance(PP_Instance instance, uint32_t* result);
tommycliee0a49b2015-05-05 19:40:4942 void OnMsgPostPowerSaverStatus(PP_Instance instance);
43 void OnMsgSubscribeToPowerSaverNotifications(PP_Instance instance);
[email protected]ed33e2e2011-11-20 21:18:0744 void OnMsgSimulateInputEvent(PP_Instance instance,
45 const ppapi::InputEventData& input_event);
[email protected]38f428f12013-04-19 14:46:0546 void OnMsgSetMinimumArrayBufferSizeForShmem(uint32_t threshold);
[email protected]1054c072010-11-05 22:52:4847
[email protected]5c966022011-09-13 18:09:3748 // 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.
[email protected]7310b162013-11-25 22:39:1551 const PPB_Testing_Private* ppb_testing_impl_;
[email protected]5c966022011-09-13 18:09:3752
[email protected]1054c072010-11-05 22:52:4853 DISALLOW_COPY_AND_ASSIGN(PPB_Testing_Proxy);
54};
55
56} // namespace proxy
[email protected]4d2efd22011-08-18 21:58:0257} // namespace ppapi
[email protected]1054c072010-11-05 22:52:4858
59#endif // PPAPI_PROXY_PPB_TESTING_PROXY_H_