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

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

Issue 8920005: Add TestingInstance::EvalScript method which posts a message that the test page can eval(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/pp_var.h"
11 #include "ppapi/proxy/interface_proxy.h" 12 #include "ppapi/proxy/interface_proxy.h"
12 #include "ppapi/shared_impl/host_resource.h" 13 #include "ppapi/shared_impl/host_resource.h"
13 14
14 struct PP_Point; 15 struct PP_Point;
15 struct PPB_Testing_Dev; 16 struct PPB_Testing_Dev;
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
24 class SerializedVarReceiveInput;
25 class SerializedVarOutParam;
26 class SerializedVarReturnValue;
27
23 class PPB_Testing_Proxy : public InterfaceProxy { 28 class PPB_Testing_Proxy : public InterfaceProxy {
24 public: 29 public:
25 PPB_Testing_Proxy(Dispatcher* dispatcher); 30 PPB_Testing_Proxy(Dispatcher* dispatcher);
26 virtual ~PPB_Testing_Proxy(); 31 virtual ~PPB_Testing_Proxy();
27 32
28 static const Info* GetInfo(); 33 static const Info* GetInfo();
29 34
30 // InterfaceProxy implementation. 35 // InterfaceProxy implementation.
31 virtual bool OnMessageReceived(const IPC::Message& msg); 36 virtual bool OnMessageReceived(const IPC::Message& msg);
32 37
33 private: 38 private:
34 // Message handlers. 39 // Message handlers.
35 void OnMsgReadImageData(const ppapi::HostResource& device_context_2d, 40 void OnMsgReadImageData(const ppapi::HostResource& device_context_2d,
36 const ppapi::HostResource& image, 41 const ppapi::HostResource& image,
37 const PP_Point& top_left, 42 const PP_Point& top_left,
38 PP_Bool* result); 43 PP_Bool* result);
39 void OnMsgRunMessageLoop(PP_Instance instance); 44 void OnMsgRunMessageLoop(PP_Instance instance);
40 void OnMsgQuitMessageLoop(PP_Instance instance); 45 void OnMsgQuitMessageLoop(PP_Instance instance);
41 void OnMsgGetLiveObjectsForInstance(PP_Instance instance, uint32_t* result); 46 void OnMsgGetLiveObjectsForInstance(PP_Instance instance, uint32_t* result);
42 void OnMsgSimulateInputEvent(PP_Instance instance, 47 void OnMsgSimulateInputEvent(PP_Instance instance,
43 const ppapi::InputEventData& input_event); 48 const ppapi::InputEventData& input_event);
49 void OnMsgExecuteScript(PP_Instance instance,
50 SerializedVarReceiveInput script,
51 SerializedVarOutParam out_exception,
52 SerializedVarReturnValue result);
44 53
45 // When this proxy is in the host side, this value caches the interface 54 // When this proxy is in the host side, this value caches the interface
46 // pointer so we don't have to retrieve it from the dispatcher each time. 55 // pointer so we don't have to retrieve it from the dispatcher each time.
47 // In the plugin, this value is always NULL. 56 // In the plugin, this value is always NULL.
48 const PPB_Testing_Dev* ppb_testing_impl_; 57 const PPB_Testing_Dev* ppb_testing_impl_;
49 58
50 DISALLOW_COPY_AND_ASSIGN(PPB_Testing_Proxy); 59 DISALLOW_COPY_AND_ASSIGN(PPB_Testing_Proxy);
51 }; 60 };
52 61
53 } // namespace proxy 62 } // namespace proxy
54 } // namespace ppapi 63 } // namespace ppapi
55 64
56 #endif // PPAPI_PROXY_PPB_TESTING_PROXY_H_ 65 #endif // PPAPI_PROXY_PPB_TESTING_PROXY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698