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 <ApplicationServices/ApplicationServices.h> | 7 #include <ApplicationServices/ApplicationServices.h> |
8 #include <Carbon/Carbon.h> | 8 #include <Carbon/Carbon.h> |
9 #include <algorithm> | 9 #include <algorithm> |
10 | 10 |
11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
12 #include "base/bind.h" | 12 #include "base/bind.h" |
13 #include "base/compiler_specific.h" | 13 #include "base/compiler_specific.h" |
14 #include "base/location.h" | 14 #include "base/location.h" |
15 #include "base/mac/scoped_cftyperef.h" | 15 #include "base/mac/scoped_cftyperef.h" |
16 #include "base/memory/ref_counted.h" | 16 #include "base/memory/ref_counted.h" |
17 #include "base/single_thread_task_runner.h" | 17 #include "base/single_thread_task_runner.h" |
18 #include "base/strings/utf_string_conversions.h" | 18 #include "base/strings/utf_string_conversions.h" |
19 #include "remoting/host/clipboard.h" | 19 #include "remoting/host/clipboard.h" |
20 #include "remoting/proto/internal.pb.h" | 20 #include "remoting/proto/internal.pb.h" |
21 #include "remoting/protocol/message_decoder.h" | 21 #include "remoting/protocol/message_decoder.h" |
22 #include "third_party/webrtc/modules/desktop_capture/desktop_geometry.h" | 22 #include "third_party/webrtc/modules/desktop_capture/desktop_geometry.h" |
23 #include "third_party/webrtc/modules/desktop_capture/mac/desktop_configuration.h
" | 23 #include "third_party/webrtc/modules/desktop_capture/mac/desktop_configuration.h
" |
24 #include "ui/events/keycodes/dom4/keycode_converter.h" | 24 #include "ui/events/keycodes/dom/keycode_converter.h" |
25 | 25 |
26 namespace remoting { | 26 namespace remoting { |
27 | 27 |
28 namespace { | 28 namespace { |
29 | 29 |
30 void SetOrClearBit(uint64_t &value, uint64_t bit, bool set_bit) { | 30 void SetOrClearBit(uint64_t &value, uint64_t bit, bool set_bit) { |
31 value = set_bit ? (value | bit) : (value & ~bit); | 31 value = set_bit ? (value | bit) : (value & ~bit); |
32 } | 32 } |
33 | 33 |
34 void CreateAndPostKeyEvent(int keycode, | 34 void CreateAndPostKeyEvent(int keycode, |
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
340 | 340 |
341 } // namespace | 341 } // namespace |
342 | 342 |
343 scoped_ptr<InputInjector> InputInjector::Create( | 343 scoped_ptr<InputInjector> InputInjector::Create( |
344 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner, | 344 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner, |
345 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner) { | 345 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner) { |
346 return make_scoped_ptr(new InputInjectorMac(main_task_runner)); | 346 return make_scoped_ptr(new InputInjectorMac(main_task_runner)); |
347 } | 347 } |
348 | 348 |
349 } // namespace remoting | 349 } // namespace remoting |
OLD | NEW |