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

Side by Side Diff: content/browser/renderer_host/input/touch_emulator.h

Issue 375863005: Touch emulator: allow multiple touch streams. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: better touch sequence end check Created 6 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 CONTENT_BROWSER_RENDERER_HOST_INPUT_TOUCH_EMULATOR_H_ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_INPUT_TOUCH_EMULATOR_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_INPUT_TOUCH_EMULATOR_H_ 6 #define CONTENT_BROWSER_RENDERER_HOST_INPUT_TOUCH_EMULATOR_H_
7 7
8 #include "content/browser/renderer_host/input/touch_emulator_client.h" 8 #include "content/browser/renderer_host/input/touch_emulator_client.h"
9 #include "content/common/cursors/webcursor.h" 9 #include "content/common/cursors/webcursor.h"
10 #include "content/common/input/input_event_ack_state.h" 10 #include "content/common/input/input_event_ack_state.h"
(...skipping 11 matching lines...) Expand all
22 22
23 void Enable(bool allow_pinch); 23 void Enable(bool allow_pinch);
24 void Disable(); 24 void Disable();
25 25
26 // Returns |true| if the event was consumed. 26 // Returns |true| if the event was consumed.
27 // TODO(dgozman): maybe pass latency info together with events. 27 // TODO(dgozman): maybe pass latency info together with events.
28 bool HandleMouseEvent(const blink::WebMouseEvent& event); 28 bool HandleMouseEvent(const blink::WebMouseEvent& event);
29 bool HandleMouseWheelEvent(const blink::WebMouseWheelEvent& event); 29 bool HandleMouseWheelEvent(const blink::WebMouseWheelEvent& event);
30 bool HandleKeyboardEvent(const blink::WebKeyboardEvent& event); 30 bool HandleKeyboardEvent(const blink::WebKeyboardEvent& event);
31 31
32 // Returns |true| if the event ack was consumed. Consumed ack should not 32 void HandleTouchEventAck(InputEventAckState ack_result);
33 // propagate any further.
34 bool HandleTouchEventAck(InputEventAckState ack_result);
35 33
36 // Cancel any touches, for example, when focus is lost. 34 // Cancel any touches, for example, when focus is lost.
37 void CancelTouch(); 35 void CancelTouch();
38 36
39 private: 37 private:
40 // ui::GestureProviderClient implementation. 38 // ui::GestureProviderClient implementation.
41 virtual void OnGestureEvent(const ui::GestureEventData& gesture) OVERRIDE; 39 virtual void OnGestureEvent(const ui::GestureEventData& gesture) OVERRIDE;
42 40
43 // Returns cursor size in DIP. 41 // Returns cursor size in DIP.
44 gfx::SizeF InitCursorFromResource( 42 gfx::SizeF InitCursorFromResource(
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 // The cumulative scale change from the start of pinch gesture. 93 // The cumulative scale change from the start of pinch gesture.
96 float pinch_scale_; 94 float pinch_scale_;
97 bool pinch_gesture_active_; 95 bool pinch_gesture_active_;
98 96
99 DISALLOW_COPY_AND_ASSIGN(TouchEmulator); 97 DISALLOW_COPY_AND_ASSIGN(TouchEmulator);
100 }; 98 };
101 99
102 } // namespace content 100 } // namespace content
103 101
104 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_TOUCH_EMULATOR_H_ 102 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_TOUCH_EMULATOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698