summaryrefslogtreecommitdiffstats
path: root/remoting/host/local_input_monitor.h
blob: 0c36da7175fa6dd73a62e61dabbcc2e701fd283a (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
// Copyright (c) 2012 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.

#ifndef REMOTING_LOCAL_INPUT_MONITOR_H_
#define REMOTING_LOCAL_INPUT_MONITOR_H_

#include "base/callback_forward.h"
#include "base/memory/scoped_ptr.h"

namespace remoting {

class MouseMoveObserver;

class LocalInputMonitor {
 public:
  virtual ~LocalInputMonitor() {}

  // Starts local input monitoring. This class is also responsible for
  // of catching the disconnection keyboard shortcut on Mac and Linux
  // (Ctlr-Alt-Esc). The |disconnect_callback| is called when this key
  // combination is pressed.
  //
  // TODO(sergeyu): Refactor shortcut code to a separate class.
  virtual void Start(MouseMoveObserver* mouse_move_observer,
                     const base::Closure& disconnect_callback) = 0;
  virtual void Stop() = 0;

  static scoped_ptr<LocalInputMonitor> Create();
};

}  // namespace remoting

#endif