OLD | NEW |
---|---|
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/input_handler.h" | 5 #include "remoting/client/input_handler.h" |
6 | 6 |
7 #include "remoting/client/chromoting_view.h" | 7 #include "remoting/client/chromoting_view.h" |
8 #include "remoting/proto/event.pb.h" | 8 #include "remoting/proto/event.pb.h" |
9 #include "remoting/protocol/connection_to_host.h" | 9 #include "remoting/protocol/connection_to_host.h" |
10 | 10 |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
48 protocol::InputStub* stub = connection_->input_stub(); | 48 protocol::InputStub* stub = connection_->input_stub(); |
49 if (stub) { | 49 if (stub) { |
50 MouseEvent* event = new MouseEvent(); | 50 MouseEvent* event = new MouseEvent(); |
51 event->set_button(button); | 51 event->set_button(button); |
52 event->set_button_down(button_down); | 52 event->set_button_down(button_down); |
53 | 53 |
54 stub->InjectMouseEvent(event, new DeleteTask<MouseEvent>(event)); | 54 stub->InjectMouseEvent(event, new DeleteTask<MouseEvent>(event)); |
55 } | 55 } |
56 } | 56 } |
57 | 57 |
58 void InputHandler::SendMouseWheelEvent(int dx, int dy, | |
59 int clicks_x, int clicks_y, bool page) { | |
60 protocol::InputStub* stub = connection_->input_stub(); | |
61 if (stub) { | |
62 MouseEvent* event = new MouseEvent(); | |
63 event->set_wheel_offset_x(dx); | |
64 event->set_wheel_offset_y(dy); | |
65 event->set_wheel_clicks_x(clicks_x); | |
66 event->set_wheel_clicks_y(clicks_y); | |
67 event->set_wheel_by_page(page); | |
68 | |
69 stub->InjectMouseEvent(event, new DeleteTask<MouseEvent>(event)); | |
Wez
2011/03/16 11:40:40
Niggle: I'm not keen on "InjectXXX" as client-sid
garykac
2011/03/16 20:43:43
This is a side-effect of having a common stub inte
| |
70 } | |
71 } | |
72 | |
58 } // namespace remoting | 73 } // namespace remoting |
OLD | NEW |