1// Copyright 2014 The Chromium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef REMOTING_HOST_SINGLE_WINDOW_INPUT_INJECTOR_H_
6#define REMOTING_HOST_SINGLE_WINDOW_INPUT_INJECTOR_H_
7
8#include "base/memory/scoped_ptr.h"
9#include "remoting/host/input_injector.h"
10#include "third_party/webrtc/modules/desktop_capture/desktop_capture_types.h"
11
12namespace remoting {
13
14// This class is used to wrap an InputInjector. All this class does
15// is forward messages to the wrapped InputInjector. When a MouseEvent
16// comes in, SingleWindowInputInjector adjusts the MouseEvent's
17// coordinates so that they are in respect to the window instead of
18// the desktop. Clipboard, Text, and Key events are still global.
19class SingleWindowInputInjector : public InputInjector {
20 public:
21  // This Create method needs to be passed a full desktop
22  // InputInjector.
23  static scoped_ptr<InputInjector> CreateForWindow(
24      webrtc::WindowId window_id,
25      scoped_ptr<InputInjector> input_injector);
26};
27
28}  // namespace remoting
29
30#endif  // REMOTING_HOST_SINGLE_WINDOW_INPUT_INJECTOR_H_
31