Pin Chrome's shortcut to the Win10 Start menu on install and OS upgrade.
[chromium-blink-merge.git] / remoting / protocol / input_filter.cc
blob83e9122d7b414c7eb1807a8b7ce14fa5363b22e0
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
3 // found in the LICENSE file.
5 #include "remoting/protocol/input_filter.h"
7 namespace remoting {
8 namespace protocol {
10 InputFilter::InputFilter() : input_stub_(nullptr), enabled_(true) {
13 InputFilter::InputFilter(InputStub* input_stub)
14 : input_stub_(input_stub), enabled_(true) {
17 InputFilter::~InputFilter() {
20 void InputFilter::InjectKeyEvent(const KeyEvent& event) {
21 if (enabled_ && input_stub_ != nullptr)
22 input_stub_->InjectKeyEvent(event);
25 void InputFilter::InjectTextEvent(const TextEvent& event) {
26 if (enabled_ && input_stub_ != nullptr)
27 input_stub_->InjectTextEvent(event);
30 void InputFilter::InjectMouseEvent(const MouseEvent& event) {
31 if (enabled_ && input_stub_ != nullptr)
32 input_stub_->InjectMouseEvent(event);
35 void InputFilter::InjectTouchEvent(const TouchEvent& event) {
36 if (enabled_ && input_stub_ != nullptr)
37 input_stub_->InjectTouchEvent(event);
40 } // namespace protocol
41 } // namespace remoting