| OLD | NEW | 
|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be | 
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. | 
| 4 | 4 | 
| 5 #ifndef REMOTING_PROTOCOL_INPUT_EVENT_TRACKER_H_ | 5 #ifndef REMOTING_PROTOCOL_INPUT_EVENT_TRACKER_H_ | 
| 6 #define REMOTING_PROTOCOL_INPUT_EVENT_TRACKER_H_ | 6 #define REMOTING_PROTOCOL_INPUT_EVENT_TRACKER_H_ | 
| 7 | 7 | 
| 8 #include <set> | 8 #include <set> | 
| 9 | 9 | 
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" | 
| 11 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" | 
| 12 #include "remoting/protocol/input_stub.h" | 12 #include "remoting/protocol/input_stub.h" | 
| 13 #include "third_party/webrtc/modules/desktop_capture/desktop_geometry.h" | 13 #include "third_party/skia/include/core/SkPoint.h" | 
| 14 | 14 | 
| 15 namespace remoting { | 15 namespace remoting { | 
| 16 namespace protocol { | 16 namespace protocol { | 
| 17 | 17 | 
| 18 // Filtering InputStub which tracks mouse and keyboard input events before | 18 // Filtering InputStub which tracks mouse and keyboard input events before | 
| 19 // passing them on to |input_stub|, and can dispatch release events to | 19 // passing them on to |input_stub|, and can dispatch release events to | 
| 20 // |input_stub| for all currently-pressed keys and buttons when necessary. | 20 // |input_stub| for all currently-pressed keys and buttons when necessary. | 
| 21 class InputEventTracker : public InputStub { | 21 class InputEventTracker : public InputStub { | 
| 22  public: | 22  public: | 
| 23   explicit InputEventTracker(protocol::InputStub* input_stub); | 23   explicit InputEventTracker(protocol::InputStub* input_stub); | 
| (...skipping 11 matching lines...) Expand all  Loading... | 
| 35 | 35 | 
| 36   // InputStub interface. | 36   // InputStub interface. | 
| 37   virtual void InjectKeyEvent(const KeyEvent& event) OVERRIDE; | 37   virtual void InjectKeyEvent(const KeyEvent& event) OVERRIDE; | 
| 38   virtual void InjectMouseEvent(const MouseEvent& event) OVERRIDE; | 38   virtual void InjectMouseEvent(const MouseEvent& event) OVERRIDE; | 
| 39 | 39 | 
| 40  private: | 40  private: | 
| 41   protocol::InputStub* input_stub_; | 41   protocol::InputStub* input_stub_; | 
| 42 | 42 | 
| 43   std::set<uint32> pressed_keys_; | 43   std::set<uint32> pressed_keys_; | 
| 44 | 44 | 
| 45   webrtc::DesktopVector mouse_pos_; | 45   SkIPoint mouse_pos_; | 
| 46   uint32 mouse_button_state_; | 46   uint32 mouse_button_state_; | 
| 47 | 47 | 
| 48   DISALLOW_COPY_AND_ASSIGN(InputEventTracker); | 48   DISALLOW_COPY_AND_ASSIGN(InputEventTracker); | 
| 49 }; | 49 }; | 
| 50 | 50 | 
| 51 }  // namespace protocol | 51 }  // namespace protocol | 
| 52 }  // namespace remoting | 52 }  // namespace remoting | 
| 53 | 53 | 
| 54 #endif  // REMOTING_PROTOCOL_INPUT_EVENT_TRACKER_H_ | 54 #endif  // REMOTING_PROTOCOL_INPUT_EVENT_TRACKER_H_ | 
| OLD | NEW | 
|---|