| 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/event_executor.h" | 5 #include "remoting/host/event_executor.h" |
| 6 | 6 |
| 7 #include <ApplicationServices/ApplicationServices.h> | 7 #include <ApplicationServices/ApplicationServices.h> |
| 8 #include <Carbon/Carbon.h> | 8 #include <Carbon/Carbon.h> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| 11 #include "base/bind.h" | 11 #include "base/bind.h" |
| 12 #include "base/compiler_specific.h" | 12 #include "base/compiler_specific.h" |
| 13 #include "base/mac/scoped_cftyperef.h" | 13 #include "base/mac/scoped_cftyperef.h" |
| 14 #include "base/message_loop.h" | 14 #include "base/message_loop.h" |
| 15 #include "remoting/host/clipboard.h" | 15 #include "remoting/host/clipboard.h" |
| 16 #include "remoting/proto/internal.pb.h" | 16 #include "remoting/proto/internal.pb.h" |
| 17 #include "remoting/protocol/message_decoder.h" | 17 #include "remoting/protocol/message_decoder.h" |
| 18 #include "third_party/skia/include/core/SkPoint.h" | 18 #include "third_party/skia/include/core/SkPoint.h" |
| 19 | 19 |
| 20 namespace remoting { | 20 namespace remoting { |
| 21 | 21 |
| 22 namespace { | 22 namespace { |
| 23 | 23 |
| 24 using protocol::ClipboardEvent; | 24 using protocol::ClipboardEvent; |
| 25 using protocol::KeyEvent; | 25 using protocol::KeyEvent; |
| 26 using protocol::MouseEvent; | 26 using protocol::MouseEvent; |
| 27 | 27 |
| 28 // USB to Mac keycode mapping table. | 28 // USB to Mac keycode mapping table. |
| 29 #define USB_KEYMAP(usb, xkb, win, mac) {usb, mac} | 29 #define USB_KEYMAP(usb, xkb, win, mac) {usb, mac} |
| 30 #include "remoting/host/usb_keycode_map.h" | 30 #include "ui/base/keycodes/usb_keycode_map.h" |
| 31 #undef USB_KEYMAP | 31 #undef USB_KEYMAP |
| 32 | 32 |
| 33 // A class to generate events on Mac. | 33 // A class to generate events on Mac. |
| 34 class EventExecutorMac : public EventExecutor { | 34 class EventExecutorMac : public EventExecutor { |
| 35 public: | 35 public: |
| 36 EventExecutorMac(MessageLoop* message_loop); | 36 EventExecutorMac(MessageLoop* message_loop); |
| 37 virtual ~EventExecutorMac() {} | 37 virtual ~EventExecutorMac() {} |
| 38 | 38 |
| 39 // ClipboardStub interface. | 39 // ClipboardStub interface. |
| 40 virtual void InjectClipboardEvent(const ClipboardEvent& event) OVERRIDE; | 40 virtual void InjectClipboardEvent(const ClipboardEvent& event) OVERRIDE; |
| (...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 378 } // namespace | 378 } // namespace |
| 379 | 379 |
| 380 scoped_ptr<EventExecutor> EventExecutor::Create(MessageLoop* message_loop, | 380 scoped_ptr<EventExecutor> EventExecutor::Create(MessageLoop* message_loop, |
| 381 base::MessageLoopProxy* ui_loop, | 381 base::MessageLoopProxy* ui_loop, |
| 382 Capturer* capturer) { | 382 Capturer* capturer) { |
| 383 return scoped_ptr<EventExecutor>( | 383 return scoped_ptr<EventExecutor>( |
| 384 new EventExecutorMac(message_loop)); | 384 new EventExecutorMac(message_loop)); |
| 385 } | 385 } |
| 386 | 386 |
| 387 } // namespace remoting | 387 } // namespace remoting |
| OLD | NEW |