Chromium Code Reviews| Index: remoting/protocol/key_event_tracker.h |
| diff --git a/remoting/protocol/key_event_tracker.h b/remoting/protocol/key_event_tracker.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..71148672635b7e32b49facc48144d57097e20489 |
| --- /dev/null |
| +++ b/remoting/protocol/key_event_tracker.h |
| @@ -0,0 +1,42 @@ |
| +// Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef REMOTING_PROTOCOL_KEY_EVENT_TRACKER_H_ |
| +#define REMOTING_PROTOCOL_KEY_EVENT_TRACKER_H_ |
| + |
| +#include <set> |
| + |
| +#include "base/basictypes.h" |
| +#include "base/compiler_specific.h" |
| +#include "remoting/protocol/input_stub.h" |
| + |
| +namespace remoting { |
| + |
|
Sergey Ulanov
2011/12/20 00:05:35
remove this empty line
Wez
2011/12/20 07:14:14
Done.
|
| +namespace protocol { |
| + |
| +class KeyEventTracker : public InputStub { |
|
Sergey Ulanov
2011/12/20 00:05:35
Add comments
Wez
2011/12/20 07:14:14
Done.
|
| + public: |
| + KeyEventTracker(protocol::InputStub* input_stub); |
| + virtual ~KeyEventTracker(); |
| + |
| + // InputStub interface. |
| + virtual void InjectKeyEvent(const KeyEvent& event) OVERRIDE; |
| + virtual void InjectMouseEvent(const MouseEvent& event) OVERRIDE; |
| + |
| + // Dispatch release events for all currently-pressed keys to the InputStub. |
| + void ReleaseAllKeys(); |
|
Sergey Ulanov
2011/12/20 00:05:35
IMHO, it's better to put this before InputStub de
Wez
2011/12/20 07:14:14
Done.
|
| + |
| + protected: |
|
Sergey Ulanov
2011/12/20 00:05:35
private?
Wez
2011/12/20 07:14:14
Done.
|
| + protocol::InputStub* input_stub_; |
| + |
| + std::set<int> pressed_keys_; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(KeyEventTracker); |
| +}; |
| + |
| +} // namespace protocol |
| + |
|
Sergey Ulanov
2011/12/20 00:05:35
remove empty line
|
| +} // namespace remoting |
| + |
| +#endif // REMOTING_PROTOCOL_KEY_EVENT_TRACKER_H_ |