OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "blimp/net/input_message_generator.h" | 5 #include "blimp/net/input_message_generator.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "blimp/common/create_blimp_message.h" | 8 #include "blimp/common/create_blimp_message.h" |
9 #include "blimp/common/proto/blimp_message.pb.h" | 9 #include "blimp/common/proto/blimp_message.pb.h" |
10 #include "blimp/common/proto/input.pb.h" | 10 #include "blimp/common/proto/input.pb.h" |
11 #include "blimp/net/blimp_message_processor.h" | 11 #include "blimp/net/blimp_message_processor.h" |
12 #include "third_party/WebKit/public/platform/WebGestureDevice.h" | 12 #include "third_party/WebKit/public/platform/WebGestureDevice.h" |
13 #include "third_party/WebKit/public/web/WebInputEvent.h" | 13 #include "third_party/WebKit/public/platform/WebGestureEvent.h" |
14 | 14 |
15 namespace blimp { | 15 namespace blimp { |
16 namespace { | 16 namespace { |
17 | 17 |
18 void CommonWebGestureToProto(const blink::WebGestureEvent& event, | 18 void CommonWebGestureToProto(const blink::WebGestureEvent& event, |
19 InputMessage::Type type, | 19 InputMessage::Type type, |
20 InputMessage* proto) { | 20 InputMessage* proto) { |
21 proto->set_type(type); | 21 proto->set_type(type); |
22 proto->set_timestamp_seconds(event.timeStampSeconds); | 22 proto->set_timestamp_seconds(event.timeStampSeconds); |
23 | 23 |
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
216 case blink::WebInputEvent::Type::TouchCancel: | 216 case blink::WebInputEvent::Type::TouchCancel: |
217 case blink::WebInputEvent::Type::TouchScrollStarted: | 217 case blink::WebInputEvent::Type::TouchScrollStarted: |
218 DVLOG(1) << "Unsupported WebInputEvent type " << event.type; | 218 DVLOG(1) << "Unsupported WebInputEvent type " << event.type; |
219 return nullptr; | 219 return nullptr; |
220 } | 220 } |
221 | 221 |
222 return message; | 222 return message; |
223 } | 223 } |
224 | 224 |
225 } // namespace blimp | 225 } // namespace blimp |
OLD | NEW |