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 #include "remoting/client/plugin/pepper_input_handler.h" | 5 #include "remoting/client/plugin/pepper_input_handler.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "ppapi/cpp/image_data.h" | 8 #include "ppapi/cpp/image_data.h" |
9 #include "ppapi/cpp/input_event.h" | 9 #include "ppapi/cpp/input_event.h" |
10 #include "ppapi/cpp/module_impl.h" | 10 #include "ppapi/cpp/module_impl.h" |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 pp::Point delta = pp_mouse_event.GetMovement(); | 53 pp::Point delta = pp_mouse_event.GetMovement(); |
54 mouse_event.set_delta_x(delta.x()); | 54 mouse_event.set_delta_x(delta.x()); |
55 mouse_event.set_delta_y(delta.y()); | 55 mouse_event.set_delta_y(delta.y()); |
56 } | 56 } |
57 return mouse_event; | 57 return mouse_event; |
58 } | 58 } |
59 | 59 |
60 } // namespace | 60 } // namespace |
61 | 61 |
62 PepperInputHandler::PepperInputHandler() | 62 PepperInputHandler::PepperInputHandler() |
63 : input_stub_(NULL), | 63 : input_stub_(nullptr), |
64 has_focus_(false), | 64 has_focus_(false), |
65 send_mouse_input_when_unfocused_(false), | 65 send_mouse_input_when_unfocused_(false), |
66 send_mouse_move_deltas_(false), | 66 send_mouse_move_deltas_(false), |
67 wheel_delta_x_(0), | 67 wheel_delta_x_(0), |
68 wheel_delta_y_(0), | 68 wheel_delta_y_(0), |
69 wheel_ticks_x_(0), | 69 wheel_ticks_x_(0), |
70 wheel_ticks_y_(0) { | 70 wheel_ticks_y_(0) { |
71 } | 71 } |
72 | 72 |
73 bool PepperInputHandler::HandleInputEvent(const pp::InputEvent& event) { | 73 bool PepperInputHandler::HandleInputEvent(const pp::InputEvent& event) { |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
194 } | 194 } |
195 | 195 |
196 return false; | 196 return false; |
197 } | 197 } |
198 | 198 |
199 void PepperInputHandler::DidChangeFocus(bool has_focus) { | 199 void PepperInputHandler::DidChangeFocus(bool has_focus) { |
200 has_focus_ = has_focus; | 200 has_focus_ = has_focus; |
201 } | 201 } |
202 | 202 |
203 } // namespace remoting | 203 } // namespace remoting |
OLD | NEW |