Do not create the NativeViewport PlatformEventSource when headless.
[chromium-blink-merge.git] / remoting / protocol / input_stub.h
blob4277713c95f450663e230fc0674bf1805a092a80
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
3 // found in the LICENSE file.
5 // Interface for a device that receives input events.
6 // This interface handles input event messages defined in event.proto.
8 #ifndef REMOTING_PROTOCOL_INPUT_STUB_H_
9 #define REMOTING_PROTOCOL_INPUT_STUB_H_
11 #include "base/basictypes.h"
13 namespace remoting {
14 namespace protocol {
16 class KeyEvent;
17 class TextEvent;
18 class MouseEvent;
19 class TouchEvent;
21 class InputStub {
22 public:
23 InputStub() {}
24 virtual ~InputStub() {}
26 // Implementations must never assume the presence of any |event| fields,
27 // nor assume that their contents are valid.
28 virtual void InjectKeyEvent(const KeyEvent& event) = 0;
29 virtual void InjectTextEvent(const TextEvent& event) = 0;
30 virtual void InjectMouseEvent(const MouseEvent& event) = 0;
31 virtual void InjectTouchEvent(const TouchEvent& event) = 0;
33 private:
34 DISALLOW_COPY_AND_ASSIGN(InputStub);
37 } // namespace protocol
38 } // namespace remoting
40 #endif // REMOTING_PROTOCOL_INPUT_STUB_H_