summaryrefslogtreecommitdiffstats
path: root/remoting/host/event_executor_mac.cc
blob: 37041a80b87f5e4922be352e622ec9ced44364ac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "remoting/host/event_executor_mac.h"

#include "base/message_loop.h"
#include "base/task.h"
#include "remoting/protocol/message_decoder.h"

namespace remoting {

using protocol::MouseEvent;
using protocol::KeyEvent;

EventExecutorMac::EventExecutorMac(
    MessageLoop* message_loop, Capturer* capturer)
    : message_loop_(message_loop),
      capturer_(capturer) {
}

EventExecutorMac::~EventExecutorMac() {
}

void EventExecutorMac::InjectKeyEvent(const KeyEvent* event, Task* done) {
  done->Run();
  delete done;
}

void EventExecutorMac::InjectMouseEvent(const MouseEvent* event, Task* done) {
  done->Run();
  delete done;
}

protocol::InputStub* CreateEventExecutor(MessageLoop* message_loop,
                                         Capturer* capturer) {
  return new EventExecutorMac(message_loop, capturer);
}

}  // namespace remoting