| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "remoting/protocol/input_filter.h" | 5 #include "remoting/protocol/input_filter.h" |
| 6 | 6 |
| 7 namespace remoting { | 7 namespace remoting { |
| 8 namespace protocol { | 8 namespace protocol { |
| 9 | 9 |
| 10 InputFilter::InputFilter() : input_stub_(NULL) { | 10 InputFilter::InputFilter() : input_stub_(NULL) { |
| 11 } | 11 } |
| 12 | 12 |
| 13 InputFilter::InputFilter(InputStub* input_stub) : input_stub_(input_stub) { |
| 14 } |
| 15 |
| 13 InputFilter::~InputFilter() { | 16 InputFilter::~InputFilter() { |
| 14 } | 17 } |
| 15 | 18 |
| 16 void InputFilter::InjectKeyEvent(const KeyEvent& event) { | 19 void InputFilter::InjectKeyEvent(const KeyEvent& event) { |
| 17 if (input_stub_ != NULL) | 20 if (input_stub_ != NULL) |
| 18 input_stub_->InjectKeyEvent(event); | 21 input_stub_->InjectKeyEvent(event); |
| 19 } | 22 } |
| 20 | 23 |
| 21 void InputFilter::InjectMouseEvent(const MouseEvent& event) { | 24 void InputFilter::InjectMouseEvent(const MouseEvent& event) { |
| 22 if (input_stub_ != NULL) | 25 if (input_stub_ != NULL) |
| 23 input_stub_->InjectMouseEvent(event); | 26 input_stub_->InjectMouseEvent(event); |
| 24 } | 27 } |
| 25 | 28 |
| 26 } // namespace protocol | 29 } // namespace protocol |
| 27 } // namespace remoting | 30 } // namespace remoting |
| OLD | NEW |