blob: 57ec051828bc8dc1383ab9582e625dceeae7c0bb [file] [log] [blame]
// 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.
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
namespace base {
class SingleThreadTaskRunner;
} // namespace base
namespace remoting {
class ClientSessionControl;
// Monitors the local input to notify about mouse movements. On Mac and Linux
// catches the disconnection keyboard shortcut (Ctlr-Alt-Esc) and invokes
// SessionController::Delegate::DisconnectSession() when this key combination is
// pressed.
// TODO(sergeyu): Refactor shortcut code to a separate class.
class LocalInputMonitor {
virtual ~LocalInputMonitor() {}
// Creates a platform-specific instance of LocalInputMonitor.
// |client_session_control| is called on the |caller_task_runner| thread.
static scoped_ptr<LocalInputMonitor> Create(
scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner,
scoped_refptr<base::SingleThreadTaskRunner> input_task_runner,
scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner,
base::WeakPtr<ClientSessionControl> client_session_control);
LocalInputMonitor() {}
} // namespace remoting