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/chromoting_session.h" |
| 9 #include "remoting/client/input/text_keyboard_input_strategy.h" |
| 10 |
| 11 namespace remoting { |
| 12 |
| 13 KeyboardInterpreter::KeyboardInterpreter(ChromotingSession* input_stub) { |
| 14 // TODO(nicholss): This should be configurable. |
| 15 input_strategy_.reset(new TextKeyboardInputStrategy(input_stub)); |
| 16 } |
| 17 |
| 18 KeyboardInterpreter::~KeyboardInterpreter() {} |
| 19 |
| 20 void KeyboardInterpreter::HandleTextEvent(const std::string& text, |
| 21 uint8_t modifiers) { |
| 22 input_strategy_->HandleTextEvent(text, modifiers); |
| 23 } |
| 24 |
| 25 void KeyboardInterpreter::HandleDeleteEvent(uint8_t modifiers) { |
| 26 input_strategy_->HandleDeleteEvent(modifiers); |
| 27 } |
| 28 |
| 29 } // namespace remoting |
OLD | NEW |