Home | History | Annotate | Download | only in plugin
      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 #ifndef REMOTING_CLIENT_PLUGIN_PEPPER_INPUT_HANDLER_H_
      6 #define REMOTING_CLIENT_PLUGIN_PEPPER_INPUT_HANDLER_H_
      7 
      8 #include "base/compiler_specific.h"
      9 #include "remoting/protocol/input_stub.h"
     10 
     11 namespace pp {
     12 class InputEvent;
     13 }  // namespace pp
     14 
     15 namespace remoting {
     16 
     17 namespace protocol {
     18 class InputStub;
     19 } // namespace protocol
     20 
     21 class PepperInputHandler {
     22  public:
     23   explicit PepperInputHandler(protocol::InputStub* input_stub);
     24   virtual ~PepperInputHandler();
     25 
     26   bool HandleInputEvent(const pp::InputEvent& event);
     27 
     28  private:
     29   protocol::InputStub* input_stub_;
     30 
     31   // Accumulated sub-pixel and sub-tick deltas from wheel events.
     32   float wheel_delta_x_;
     33   float wheel_delta_y_;
     34   float wheel_ticks_x_;
     35   float wheel_ticks_y_;
     36 
     37   DISALLOW_COPY_AND_ASSIGN(PepperInputHandler);
     38 };
     39 
     40 }  // namespace remoting
     41 
     42 #endif  // REMOTING_CLIENT_PLUGIN_PEPPER_INPUT_HANDLER_H_
     43