blob: 938091084dad284d6543ee14222f2bffabb3c738 [file] [log] [blame]
Avi Drissmandb497b32022-09-15 19:47:281// Copyright 2012 The Chromium Authors
[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
avie029c4132015-12-23 06:45:228#include <stdint.h>
9
[email protected]4614f192011-01-21 00:26:4310#include "ppapi/c/pp_instance.h"
[email protected]1054c072010-11-05 22:52:4811#include "ppapi/c/pp_resource.h"
[email protected]7310b162013-11-25 22:39:1512#include "ppapi/c/private/ppb_testing_private.h"
[email protected]1054c072010-11-05 22:52:4813#include "ppapi/proxy/interface_proxy.h"
[email protected]be0a84b2011-08-13 04:18:4414#include "ppapi/shared_impl/host_resource.h"
[email protected]1054c072010-11-05 22:52:4815
16struct PP_Point;
[email protected]1054c072010-11-05 22:52:4817
[email protected]4d2efd22011-08-18 21:58:0218namespace ppapi {
[email protected]ed33e2e2011-11-20 21:18:0719
20struct InputEventData;
21
[email protected]1054c072010-11-05 22:52:4822namespace proxy {
23
24class PPB_Testing_Proxy : public InterfaceProxy {
25 public:
Lei Zhang94f57fe32017-08-30 23:58:2426 explicit PPB_Testing_Proxy(Dispatcher* dispatcher);
Peter Boström3d5b3cb2021-09-23 21:35:4527
28 PPB_Testing_Proxy(const PPB_Testing_Proxy&) = delete;
29 PPB_Testing_Proxy& operator=(const PPB_Testing_Proxy&) = delete;
30
Lei Zhang94f57fe32017-08-30 23:58:2431 ~PPB_Testing_Proxy() override;
[email protected]1054c072010-11-05 22:52:4832
[email protected]637fc4cd2013-12-06 22:08:1533 static const PPB_Testing_Private* GetProxyInterface();
[email protected]465faa22011-02-08 16:31:4634
[email protected]1054c072010-11-05 22:52:4835 // InterfaceProxy implementation.
Lei Zhang94f57fe32017-08-30 23:58:2436 bool OnMessageReceived(const IPC::Message& msg) override;
[email protected]1054c072010-11-05 22:52:4837
38 private:
39 // Message handlers.
[email protected]be0a84b2011-08-13 04:18:4440 void OnMsgReadImageData(const ppapi::HostResource& device_context_2d,
41 const ppapi::HostResource& image,
[email protected]1054c072010-11-05 22:52:4842 const PP_Point& top_left,
[email protected]19d2b012010-11-08 16:32:1843 PP_Bool* result);
[email protected]7358d572011-02-15 18:44:4044 void OnMsgRunMessageLoop(PP_Instance instance);
45 void OnMsgQuitMessageLoop(PP_Instance instance);
[email protected]4614f192011-01-21 00:26:4346 void OnMsgGetLiveObjectsForInstance(PP_Instance instance, uint32_t* result);
tommycliee0a49b2015-05-05 19:40:4947 void OnMsgPostPowerSaverStatus(PP_Instance instance);
48 void OnMsgSubscribeToPowerSaverNotifications(PP_Instance instance);
[email protected]ed33e2e2011-11-20 21:18:0749 void OnMsgSimulateInputEvent(PP_Instance instance,
50 const ppapi::InputEventData& input_event);
[email protected]38f428f12013-04-19 14:46:0551 void OnMsgSetMinimumArrayBufferSizeForShmem(uint32_t threshold);
[email protected]1054c072010-11-05 22:52:4852
[email protected]5c966022011-09-13 18:09:3753 // When this proxy is in the host side, this value caches the interface
54 // pointer so we don't have to retrieve it from the dispatcher each time.
55 // In the plugin, this value is always NULL.
[email protected]7310b162013-11-25 22:39:1556 const PPB_Testing_Private* ppb_testing_impl_;
[email protected]1054c072010-11-05 22:52:4857};
58
59} // namespace proxy
[email protected]4d2efd22011-08-18 21:58:0260} // namespace ppapi
[email protected]1054c072010-11-05 22:52:4861
62#endif // PPAPI_PROXY_PPB_TESTING_PROXY_H_