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

Side by Side Diff: remoting/client/input_handler.h

Issue 8985007: Refactoring of the client-side input pipeline and scaling dimension management. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase. Created 9 years 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) 2011 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_CLIENT_INPUT_HANDLER_H_
6 #define REMOTING_CLIENT_INPUT_HANDLER_H_
7
8 #include <set>
9
10 #include "base/basictypes.h"
11 #include "remoting/proto/event.pb.h"
12
13 namespace remoting {
14
15 class ClientContext;
16 class ChromotingView;
17
18 namespace protocol {
19 class ConnectionToHost;
20 } // namespace protocol
21
22 class InputHandler {
23 public:
24 InputHandler(ClientContext* context,
25 protocol::ConnectionToHost* connection,
26 ChromotingView* view);
27 virtual ~InputHandler();
28
29 virtual void Initialize() = 0;
30
31 void ReleaseAllKeys();
32
33 protected:
34 void SendKeyEvent(bool press, int keycode);
35 void SendMouseMoveEvent(int x, int y);
36 void SendMouseButtonEvent(bool down,
37 protocol::MouseEvent::MouseButton button);
38 void SendMouseWheelEvent(int dx, int dy);
39
40 ClientContext* context_;
41 protocol::ConnectionToHost* connection_;
42 ChromotingView* view_;
43
44 private:
45 std::set<int> pressed_keys_;
46
47 DISALLOW_COPY_AND_ASSIGN(InputHandler);
48 };
49
50 } // namespace remoting
51
52 #endif // REMOTING_CLIENT_INPUT_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698