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

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

Issue 9465035: Move ClientSession's input logic into separate components. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Replace |authenticated_| with an InputFilter. Created 8 years, 8 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef REMOTING_PROTOCOL_INPUT_EVENT_TRACKER_H_
6 #define REMOTING_PROTOCOL_INPUT_EVENT_TRACKER_H_
7
8 #include <set>
9
10 #include "base/basictypes.h"
11 #include "base/compiler_specific.h"
12 #include "remoting/protocol/input_stub.h"
13 #include "third_party/skia/include/core/SkPoint.h"
14
15 namespace remoting {
16 namespace protocol {
17
18 // Filtering InputStub which tracks mouse and keyboard input events before
19 // passing them on to |input_stub|, and can dispatch release events to
20 // |input_stub| for all currently-pressed keys and buttons when necessary.
21 class InputEventTracker : public InputStub {
22 public:
23 InputEventTracker(protocol::InputStub* input_stub);
Sergey Ulanov 2012/03/30 20:33:54 explicit
Wez 2012/04/01 00:47:15 Done.
24 virtual ~InputEventTracker();
25
26 // Dispatch release events for all currently-pressed keys and mouse buttons
27 // to the InputStub.
28 void ReleaseAll();
29
30 // InputStub interface.
31 virtual void InjectKeyEvent(const KeyEvent& event) OVERRIDE;
32 virtual void InjectMouseEvent(const MouseEvent& event) OVERRIDE;
33
34 private:
35 protocol::InputStub* input_stub_;
36
37 std::set<int> pressed_keys_;
38
39 SkIPoint mouse_pos_;
40 uint32 mouse_button_state_;
41
42 DISALLOW_COPY_AND_ASSIGN(InputEventTracker);
43 };
44
45 } // namespace protocol
46 } // namespace remoting
47
48 #endif // REMOTING_PROTOCOL_INPUT_EVENT_TRACKER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698