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/host/input_injector.h" | 5 #include "remoting/host/input_injector.h" |
6 | 6 |
7 #include <windows.h> | 7 #include <windows.h> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
341 PLOG(ERROR) << "Failed to inject a mouse event"; | 341 PLOG(ERROR) << "Failed to inject a mouse event"; |
342 } | 342 } |
343 } | 343 } |
344 | 344 |
345 void InputInjectorWin::Core::HandleTouch(const TouchEvent& event) { | 345 void InputInjectorWin::Core::HandleTouch(const TouchEvent& event) { |
346 touch_injector_.InjectTouchEvent(event); | 346 touch_injector_.InjectTouchEvent(event); |
347 } | 347 } |
348 | 348 |
349 } // namespace | 349 } // namespace |
350 | 350 |
| 351 // static |
351 scoped_ptr<InputInjector> InputInjector::Create( | 352 scoped_ptr<InputInjector> InputInjector::Create( |
352 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner, | 353 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner, |
353 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner) { | 354 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner) { |
354 return make_scoped_ptr( | 355 return make_scoped_ptr( |
355 new InputInjectorWin(main_task_runner, ui_task_runner)); | 356 new InputInjectorWin(main_task_runner, ui_task_runner)); |
356 } | 357 } |
357 | 358 |
| 359 // static |
| 360 bool InputInjector::SupportsTouchEvents() { |
| 361 return TouchInjectorWinDelegate::Create(); |
| 362 } |
| 363 |
358 } // namespace remoting | 364 } // namespace remoting |
OLD | NEW |