Home | History | Annotate | Download | only in protocol
      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.
      4 
      5 // Interface for a device that receives input events.
      6 // This interface handles input event messages defined in event.proto.
      7 
      8 #ifndef REMOTING_PROTOCOL_INPUT_STUB_H_
      9 #define REMOTING_PROTOCOL_INPUT_STUB_H_
     10 
     11 #include "base/basictypes.h"
     12 
     13 namespace remoting {
     14 namespace protocol {
     15 
     16 class KeyEvent;
     17 class MouseEvent;
     18 
     19 class InputStub {
     20  public:
     21   InputStub() {}
     22   virtual ~InputStub() {}
     23 
     24   // Implementations must never assume the presence of any |event| fields,
     25   // nor assume that their contents are valid.
     26   virtual void InjectKeyEvent(const KeyEvent& event) = 0;
     27   virtual void InjectMouseEvent(const MouseEvent& event) = 0;
     28 
     29  private:
     30   DISALLOW_COPY_AND_ASSIGN(InputStub);
     31 };
     32 
     33 }  // namespace protocol
     34 }  // namespace remoting
     35 
     36 #endif  // REMOTING_PROTOCOL_INPUT_STUB_H_
     37