OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2017 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 #include "remoting/client/input/keyboard_interpreter.h" | |
6 | |
7 #include "base/logging.h" | |
8 #include "remoting/client/input/client_input_injector.h" | |
Yuwei
2017/05/17 21:41:20
You probably don't need to include client_input_in
nicholss
2017/05/22 18:52:44
Done.
| |
9 #include "remoting/client/input/text_keyboard_input_strategy.h" | |
10 | |
11 namespace remoting { | |
12 | |
13 class ClientInputInjector; | |
Yuwei
2017/05/17 21:41:20
Why is there an extra forward-declare?
nicholss
2017/05/22 18:52:44
Done.
| |
14 | |
15 KeyboardInterpreter::KeyboardInterpreter(ClientInputInjector* input_injector) { | |
16 // TODO(nicholss): This should be configurable. | |
17 input_strategy_.reset(new TextKeyboardInputStrategy(input_injector)); | |
18 } | |
19 | |
20 KeyboardInterpreter::~KeyboardInterpreter() {} | |
21 | |
22 void KeyboardInterpreter::HandleTextEvent(const std::string& text, | |
23 uint8_t modifiers) { | |
24 input_strategy_->HandleTextEvent(text, modifiers); | |
25 } | |
26 | |
27 void KeyboardInterpreter::HandleDeleteEvent(uint8_t modifiers) { | |
28 input_strategy_->HandleDeleteEvent(modifiers); | |
29 } | |
30 | |
31 } // namespace remoting | |
OLD | NEW |