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

Side by Side Diff: ppapi/proxy/ppp_input_event_proxy.cc

Issue 9558009: Add HandleInputEventAck message to allow out-of-process plugins to respond to user gestures. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 9 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/ppp_input_event_proxy.h ('k') | ppapi/tests/test_fullscreen.h » ('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) 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 #include "ppapi/proxy/ppp_input_event_proxy.h" 5 #include "ppapi/proxy/ppp_input_event_proxy.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "ppapi/c/ppp_input_event.h" 9 #include "ppapi/c/ppp_input_event.h"
10 #include "ppapi/proxy/host_dispatcher.h" 10 #include "ppapi/proxy/host_dispatcher.h"
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 return handled; 94 return handled;
95 } 95 }
96 96
97 void PPP_InputEvent_Proxy::OnMsgHandleInputEvent(PP_Instance instance, 97 void PPP_InputEvent_Proxy::OnMsgHandleInputEvent(PP_Instance instance,
98 const InputEventData& data) { 98 const InputEventData& data) {
99 scoped_refptr<PPB_InputEvent_Shared> resource(new PPB_InputEvent_Shared( 99 scoped_refptr<PPB_InputEvent_Shared> resource(new PPB_InputEvent_Shared(
100 OBJECT_IS_PROXY, instance, data)); 100 OBJECT_IS_PROXY, instance, data));
101 CallWhileUnlocked(ppp_input_event_impl_->HandleInputEvent, 101 CallWhileUnlocked(ppp_input_event_impl_->HandleInputEvent,
102 instance, 102 instance,
103 resource->pp_resource()); 103 resource->pp_resource());
104 HandleInputEventAck(instance, data.event_time_stamp);
104 } 105 }
105 106
106 void PPP_InputEvent_Proxy::OnMsgHandleFilteredInputEvent( 107 void PPP_InputEvent_Proxy::OnMsgHandleFilteredInputEvent(
107 PP_Instance instance, 108 PP_Instance instance,
108 const InputEventData& data, 109 const InputEventData& data,
109 PP_Bool* result) { 110 PP_Bool* result) {
110 scoped_refptr<PPB_InputEvent_Shared> resource(new PPB_InputEvent_Shared( 111 scoped_refptr<PPB_InputEvent_Shared> resource(new PPB_InputEvent_Shared(
111 OBJECT_IS_PROXY, instance, data)); 112 OBJECT_IS_PROXY, instance, data));
112 *result = CallWhileUnlocked(ppp_input_event_impl_->HandleInputEvent, 113 *result = CallWhileUnlocked(ppp_input_event_impl_->HandleInputEvent,
113 instance, 114 instance,
114 resource->pp_resource()); 115 resource->pp_resource());
116 HandleInputEventAck(instance, data.event_time_stamp);
117 }
118
119 void PPP_InputEvent_Proxy::HandleInputEventAck(
120 PP_Instance instance, PP_TimeTicks timestamp) {
121 PluginDispatcher* dispatcher = PluginDispatcher::GetForInstance(instance);
122 if (dispatcher) {
123 // Note that we're sending the message to the host PPB_InstanceProxy.
124 dispatcher->Send(new PpapiMsg_PPPInputEvent_HandleInputEvent_ACK(
125 API_ID_PPB_INSTANCE, instance, timestamp));
126 } else {
127 NOTREACHED();
128 }
115 } 129 }
116 130
117 } // namespace proxy 131 } // namespace proxy
118 } // namespace ppapi 132 } // namespace ppapi
OLDNEW
« no previous file with comments | « ppapi/proxy/ppp_input_event_proxy.h ('k') | ppapi/tests/test_fullscreen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698