blob: 8340e79fa44fdb9617dd613e49ccc790d09f21b3 [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
avie029c4132015-12-23 06:45:228#include <stdint.h>
9
10#include "base/macros.h"
[email protected]4614f192011-01-21 00:26:4311#include "ppapi/c/pp_instance.h"
[email protected]1054c072010-11-05 22:52:4812#include "ppapi/c/pp_resource.h"
[email protected]7310b162013-11-25 22:39:1513#include "ppapi/c/private/ppb_testing_private.h"
[email protected]1054c072010-11-05 22:52:4814#include "ppapi/proxy/interface_proxy.h"
[email protected]be0a84b2011-08-13 04:18:4415#include "ppapi/shared_impl/host_resource.h"
[email protected]1054c072010-11-05 22:52:4816
17struct PP_Point;
[email protected]1054c072010-11-05 22:52:4818
[email protected]4d2efd22011-08-18 21:58:0219namespace ppapi {
[email protected]ed33e2e2011-11-20 21:18:0720
21struct InputEventData;
22
[email protected]1054c072010-11-05 22:52:4823namespace proxy {
24
25class PPB_Testing_Proxy : public InterfaceProxy {
26 public:
Lei Zhang94f57fe32017-08-30 23:58:2427 explicit PPB_Testing_Proxy(Dispatcher* dispatcher);
28 ~PPB_Testing_Proxy() override;
[email protected]1054c072010-11-05 22:52:4829
[email protected]637fc4cd2013-12-06 22:08:1530 static const PPB_Testing_Private* GetProxyInterface();
[email protected]465faa22011-02-08 16:31:4631
[email protected]1054c072010-11-05 22:52:4832 // InterfaceProxy implementation.
Lei Zhang94f57fe32017-08-30 23:58:2433 bool OnMessageReceived(const IPC::Message& msg) override;
[email protected]1054c072010-11-05 22:52:4834
35 private:
36 // Message handlers.
[email protected]be0a84b2011-08-13 04:18:4437 void OnMsgReadImageData(const ppapi::HostResource& device_context_2d,
38 const ppapi::HostResource& image,
[email protected]1054c072010-11-05 22:52:4839 const PP_Point& top_left,
[email protected]19d2b012010-11-08 16:32:1840 PP_Bool* result);
[email protected]7358d572011-02-15 18:44:4041 void OnMsgRunMessageLoop(PP_Instance instance);
42 void OnMsgQuitMessageLoop(PP_Instance instance);
[email protected]4614f192011-01-21 00:26:4343 void OnMsgGetLiveObjectsForInstance(PP_Instance instance, uint32_t* result);
tommycliee0a49b2015-05-05 19:40:4944 void OnMsgPostPowerSaverStatus(PP_Instance instance);
45 void OnMsgSubscribeToPowerSaverNotifications(PP_Instance instance);
[email protected]ed33e2e2011-11-20 21:18:0746 void OnMsgSimulateInputEvent(PP_Instance instance,
47 const ppapi::InputEventData& input_event);
[email protected]38f428f12013-04-19 14:46:0548 void OnMsgSetMinimumArrayBufferSizeForShmem(uint32_t threshold);
[email protected]1054c072010-11-05 22:52:4849
[email protected]5c966022011-09-13 18:09:3750 // When this proxy is in the host side, this value caches the interface
51 // pointer so we don't have to retrieve it from the dispatcher each time.
52 // In the plugin, this value is always NULL.
[email protected]7310b162013-11-25 22:39:1553 const PPB_Testing_Private* ppb_testing_impl_;
[email protected]5c966022011-09-13 18:09:3754
[email protected]1054c072010-11-05 22:52:4855 DISALLOW_COPY_AND_ASSIGN(PPB_Testing_Proxy);
56};
57
58} // namespace proxy
[email protected]4d2efd22011-08-18 21:58:0259} // namespace ppapi
[email protected]1054c072010-11-05 22:52:4860
61#endif // PPAPI_PROXY_PPB_TESTING_PROXY_H_