Fix mouse warp with 2x displays
[chromium-blink-merge.git] / remoting / host / ipc_input_injector.cc
blob3a2132f23a23dfe1fbc4c9e23f1ba042cc09065a
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/host/ipc_input_injector.h"
7 #include "remoting/host/desktop_session_proxy.h"
9 namespace remoting {
11 IpcInputInjector::IpcInputInjector(
12 scoped_refptr<DesktopSessionProxy> desktop_session_proxy)
13 : desktop_session_proxy_(desktop_session_proxy) {
16 IpcInputInjector::~IpcInputInjector() {
19 void IpcInputInjector::InjectClipboardEvent(
20 const protocol::ClipboardEvent& event) {
21 desktop_session_proxy_->InjectClipboardEvent(event);
24 void IpcInputInjector::InjectKeyEvent(const protocol::KeyEvent& event) {
25 desktop_session_proxy_->InjectKeyEvent(event);
28 void IpcInputInjector::InjectTextEvent(const protocol::TextEvent& event) {
29 desktop_session_proxy_->InjectTextEvent(event);
32 void IpcInputInjector::InjectMouseEvent(const protocol::MouseEvent& event) {
33 desktop_session_proxy_->InjectMouseEvent(event);
36 void IpcInputInjector::InjectTouchEvent(const protocol::TouchEvent& event) {
37 desktop_session_proxy_->InjectTouchEvent(event);
40 void IpcInputInjector::Start(
41 scoped_ptr<protocol::ClipboardStub> client_clipboard) {
42 desktop_session_proxy_->StartInputInjector(client_clipboard.Pass());
45 } // namespace remoting