Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5)

Side by Side Diff: ppapi/proxy/ppb_testing_proxy.h

Issue 1114623002: Plugin Power Saver: Make PPS work well with prerendered pages. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update comments Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef PPAPI_PROXY_PPB_TESTING_PROXY_H_ 5 #ifndef PPAPI_PROXY_PPB_TESTING_PROXY_H_
6 #define PPAPI_PROXY_PPB_TESTING_PROXY_H_ 6 #define PPAPI_PROXY_PPB_TESTING_PROXY_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "ppapi/c/pp_instance.h" 9 #include "ppapi/c/pp_instance.h"
10 #include "ppapi/c/pp_resource.h" 10 #include "ppapi/c/pp_resource.h"
11 #include "ppapi/c/private/ppb_testing_private.h" 11 #include "ppapi/c/private/ppb_testing_private.h"
12 #include "ppapi/proxy/interface_proxy.h" 12 #include "ppapi/proxy/interface_proxy.h"
13 #include "ppapi/proxy/serialized_var.h"
13 #include "ppapi/shared_impl/host_resource.h" 14 #include "ppapi/shared_impl/host_resource.h"
14 15
15 struct PP_Point; 16 struct PP_Point;
16 17
17 namespace ppapi { 18 namespace ppapi {
18 19
19 struct InputEventData; 20 struct InputEventData;
20 21
21 namespace proxy { 22 namespace proxy {
22 23
23 class PPB_Testing_Proxy : public InterfaceProxy { 24 class PPB_Testing_Proxy : public InterfaceProxy {
24 public: 25 public:
25 PPB_Testing_Proxy(Dispatcher* dispatcher); 26 PPB_Testing_Proxy(Dispatcher* dispatcher);
26 virtual ~PPB_Testing_Proxy(); 27 virtual ~PPB_Testing_Proxy();
27 28
28 static const PPB_Testing_Private* GetProxyInterface(); 29 static const PPB_Testing_Private* GetProxyInterface();
29 30
30 // InterfaceProxy implementation. 31 // InterfaceProxy implementation.
31 virtual bool OnMessageReceived(const IPC::Message& msg); 32 virtual bool OnMessageReceived(const IPC::Message& msg);
32 33
33 private: 34 private:
34 // Message handlers. 35 // Message handlers.
35 void OnMsgReadImageData(const ppapi::HostResource& device_context_2d, 36 void OnMsgReadImageData(const ppapi::HostResource& device_context_2d,
36 const ppapi::HostResource& image, 37 const ppapi::HostResource& image,
37 const PP_Point& top_left, 38 const PP_Point& top_left,
38 PP_Bool* result); 39 PP_Bool* result);
39 void OnMsgRunMessageLoop(PP_Instance instance); 40 void OnMsgRunMessageLoop(PP_Instance instance);
40 void OnMsgQuitMessageLoop(PP_Instance instance); 41 void OnMsgQuitMessageLoop(PP_Instance instance);
41 void OnMsgGetLiveObjectsForInstance(PP_Instance instance, uint32_t* result); 42 void OnMsgGetLiveObjectsForInstance(PP_Instance instance, uint32_t* result);
42 void OnMsgIsPeripheral(PP_Instance instance, PP_Bool* result); 43 void OnMsgGetPowerSaverStatus(PP_Instance instance,
44 SerializedVarReturnValue result);
45 void OnMsgSubscribeToPowerSaverNotifications(PP_Instance instance);
43 void OnMsgSimulateInputEvent(PP_Instance instance, 46 void OnMsgSimulateInputEvent(PP_Instance instance,
44 const ppapi::InputEventData& input_event); 47 const ppapi::InputEventData& input_event);
45 void OnMsgSetMinimumArrayBufferSizeForShmem(uint32_t threshold); 48 void OnMsgSetMinimumArrayBufferSizeForShmem(uint32_t threshold);
46 49
47 // When this proxy is in the host side, this value caches the interface 50 // When this proxy is in the host side, this value caches the interface
48 // pointer so we don't have to retrieve it from the dispatcher each time. 51 // pointer so we don't have to retrieve it from the dispatcher each time.
49 // In the plugin, this value is always NULL. 52 // In the plugin, this value is always NULL.
50 const PPB_Testing_Private* ppb_testing_impl_; 53 const PPB_Testing_Private* ppb_testing_impl_;
51 54
52 DISALLOW_COPY_AND_ASSIGN(PPB_Testing_Proxy); 55 DISALLOW_COPY_AND_ASSIGN(PPB_Testing_Proxy);
53 }; 56 };
54 57
55 } // namespace proxy 58 } // namespace proxy
56 } // namespace ppapi 59 } // namespace ppapi
57 60
58 #endif // PPAPI_PROXY_PPB_TESTING_PROXY_H_ 61 #endif // PPAPI_PROXY_PPB_TESTING_PROXY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698