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

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

Issue 7467002: Revert 93202 - Remove HandleInputEvent from PPP_Instance and freeze to 1.0. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « ppapi/proxy/ppapi_param_traits.cc ('k') | ppapi/proxy/ppp_instance_proxy.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_PPP_INSTANCE_PROXY_H_ 5 #ifndef PPAPI_PROXY_PPP_INSTANCE_PROXY_H_
6 #define PPAPI_PROXY_PPP_INSTANCE_PROXY_H_ 6 #define PPAPI_PROXY_PPP_INSTANCE_PROXY_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.h"
12 #include "ppapi/c/pp_instance.h" 12 #include "ppapi/c/pp_instance.h"
13 #include "ppapi/c/pp_resource.h" 13 #include "ppapi/c/pp_resource.h"
14 #include "ppapi/c/pp_var.h" 14 #include "ppapi/c/pp_var.h"
15 #include "ppapi/proxy/host_resource.h" 15 #include "ppapi/proxy/host_resource.h"
16 #include "ppapi/proxy/interface_proxy.h" 16 #include "ppapi/proxy/interface_proxy.h"
17 #include "ppapi/shared_impl/ppp_instance_combined.h" 17 #include "ppapi/shared_impl/ppp_instance_combined.h"
18 18
19 struct PP_InputEvent;
19 struct PP_Rect; 20 struct PP_Rect;
20 21
21 namespace pp { 22 namespace pp {
22 namespace proxy { 23 namespace proxy {
23 24
24 class SerializedVarReturnValue; 25 class SerializedVarReturnValue;
25 26
26 class PPP_Instance_Proxy : public InterfaceProxy { 27 class PPP_Instance_Proxy : public InterfaceProxy {
27 public: 28 public:
28 template <class PPP_Instance_Type> 29 template <class PPP_Instance_Type>
29 PPP_Instance_Proxy(Dispatcher* dispatcher, 30 PPP_Instance_Proxy(Dispatcher* dispatcher,
30 const PPP_Instance_Type* target_interface) 31 const PPP_Instance_Type* target_interface)
31 : InterfaceProxy(dispatcher, static_cast<const void*>(target_interface)), 32 : InterfaceProxy(dispatcher, static_cast<const void*>(target_interface)),
32 combined_interface_( 33 combined_interface_(
33 new ::ppapi::PPP_Instance_Combined(*target_interface)) { 34 new ::ppapi::PPP_Instance_Combined(*target_interface)) {
34 } 35 }
35 virtual ~PPP_Instance_Proxy(); 36 virtual ~PPP_Instance_Proxy();
36 37
37 // Return the info for the 1.0 (latest, canonical) version of the interface. 38 // Return the info for the 0.5 (latest, canonical) version of the interface.
38 static const Info* GetInfo1_0(); 39 static const Info* GetInfo0_5();
39 40
40 ::ppapi::PPP_Instance_Combined* ppp_instance_target() const { 41 ::ppapi::PPP_Instance_Combined* ppp_instance_target() const {
41 return combined_interface_.get(); 42 return combined_interface_.get();
42 } 43 }
43 44
44 // InterfaceProxy implementation. 45 // InterfaceProxy implementation.
45 virtual bool OnMessageReceived(const IPC::Message& msg); 46 virtual bool OnMessageReceived(const IPC::Message& msg);
46 47
47 private: 48 private:
48 // Message handlers. 49 // Message handlers.
49 void OnMsgDidCreate(PP_Instance instance, 50 void OnMsgDidCreate(PP_Instance instance,
50 const std::vector<std::string>& argn, 51 const std::vector<std::string>& argn,
51 const std::vector<std::string>& argv, 52 const std::vector<std::string>& argv,
52 PP_Bool* result); 53 PP_Bool* result);
53 void OnMsgDidDestroy(PP_Instance instance); 54 void OnMsgDidDestroy(PP_Instance instance);
54 void OnMsgDidChangeView(PP_Instance instance, 55 void OnMsgDidChangeView(PP_Instance instance,
55 const PP_Rect& position, 56 const PP_Rect& position,
56 const PP_Rect& clip, 57 const PP_Rect& clip,
57 PP_Bool fullscreen); 58 PP_Bool fullscreen);
58 void OnMsgDidChangeFocus(PP_Instance instance, PP_Bool has_focus); 59 void OnMsgDidChangeFocus(PP_Instance instance, PP_Bool has_focus);
60 void OnMsgHandleInputEvent(PP_Instance instance,
61 const PP_InputEvent& event,
62 PP_Bool* result);
59 void OnMsgHandleDocumentLoad(PP_Instance instance, 63 void OnMsgHandleDocumentLoad(PP_Instance instance,
60 const HostResource& url_loader, 64 const HostResource& url_loader,
61 PP_Bool* result); 65 PP_Bool* result);
62 scoped_ptr< ::ppapi::PPP_Instance_Combined> combined_interface_; 66 scoped_ptr< ::ppapi::PPP_Instance_Combined> combined_interface_;
63 }; 67 };
64 68
65 } // namespace proxy 69 } // namespace proxy
66 } // namespace pp 70 } // namespace pp
67 71
68 #endif // PPAPI_PROXY_PPP_INSTANCE_PROXY_H_ 72 #endif // PPAPI_PROXY_PPP_INSTANCE_PROXY_H_
OLDNEW
« no previous file with comments | « ppapi/proxy/ppapi_param_traits.cc ('k') | ppapi/proxy/ppp_instance_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698