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

Side by Side Diff: remoting/protocol/input_event_tracker.h

Issue 799233004: Add touch events to the protocol, the stub layer, and to the client plugin. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased Created 5 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
« no previous file with comments | « remoting/protocol/client_event_dispatcher.cc ('k') | remoting/protocol/input_event_tracker.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) 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 REMOTING_PROTOCOL_INPUT_EVENT_TRACKER_H_ 5 #ifndef REMOTING_PROTOCOL_INPUT_EVENT_TRACKER_H_
6 #define REMOTING_PROTOCOL_INPUT_EVENT_TRACKER_H_ 6 #define REMOTING_PROTOCOL_INPUT_EVENT_TRACKER_H_
7 7
8 #include <set> 8 #include <set>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 11 matching lines...) Expand all
22 public: 22 public:
23 explicit InputEventTracker(protocol::InputStub* input_stub); 23 explicit InputEventTracker(protocol::InputStub* input_stub);
24 ~InputEventTracker() override; 24 ~InputEventTracker() override;
25 25
26 // Returns true if the key with the specified USB code is currently pressed. 26 // Returns true if the key with the specified USB code is currently pressed.
27 bool IsKeyPressed(uint32 usb_keycode) const; 27 bool IsKeyPressed(uint32 usb_keycode) const;
28 28
29 // Returns the count of keys currently pressed. 29 // Returns the count of keys currently pressed.
30 int PressedKeyCount() const; 30 int PressedKeyCount() const;
31 31
32 // Dispatch release events for all currently-pressed keys and mouse buttons 32 // Dispatch release events for all currently-pressed keys, mouse buttons, and
33 // to the InputStub. 33 // touch points to the InputStub.
34 void ReleaseAll(); 34 void ReleaseAll();
35 35
36 // InputStub interface. 36 // InputStub interface.
37 void InjectKeyEvent(const KeyEvent& event) override; 37 void InjectKeyEvent(const KeyEvent& event) override;
38 void InjectTextEvent(const TextEvent& event) override; 38 void InjectTextEvent(const TextEvent& event) override;
39 void InjectMouseEvent(const MouseEvent& event) override; 39 void InjectMouseEvent(const MouseEvent& event) override;
40 void InjectTouchEvent(const TouchEvent& event) override;
40 41
41 private: 42 private:
42 protocol::InputStub* input_stub_; 43 protocol::InputStub* input_stub_;
43 44
44 std::set<uint32> pressed_keys_; 45 std::set<uint32> pressed_keys_;
45 46
46 webrtc::DesktopVector mouse_pos_; 47 webrtc::DesktopVector mouse_pos_;
47 uint32 mouse_button_state_; 48 uint32 mouse_button_state_;
48 49
50 std::set<uint32> touch_point_ids_;
51
49 DISALLOW_COPY_AND_ASSIGN(InputEventTracker); 52 DISALLOW_COPY_AND_ASSIGN(InputEventTracker);
50 }; 53 };
51 54
52 } // namespace protocol 55 } // namespace protocol
53 } // namespace remoting 56 } // namespace remoting
54 57
55 #endif // REMOTING_PROTOCOL_INPUT_EVENT_TRACKER_H_ 58 #endif // REMOTING_PROTOCOL_INPUT_EVENT_TRACKER_H_
OLDNEW
« no previous file with comments | « remoting/protocol/client_event_dispatcher.cc ('k') | remoting/protocol/input_event_tracker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698