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_converter.h" | 5 #include "blimp/net/input_message_converter.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "blimp/common/proto/input.pb.h" | 8 #include "blimp/common/proto/input.pb.h" |
9 #include "third_party/WebKit/public/platform/WebGestureDevice.h" | 9 #include "third_party/WebKit/public/platform/WebGestureDevice.h" |
10 #include "third_party/WebKit/public/web/WebInputEvent.h" | 10 #include "third_party/WebKit/public/platform/WebGestureEvent.h" |
11 | 11 |
12 namespace blimp { | 12 namespace blimp { |
13 namespace { | 13 namespace { |
14 | 14 |
15 std::unique_ptr<blink::WebGestureEvent> BuildCommonWebGesture( | 15 std::unique_ptr<blink::WebGestureEvent> BuildCommonWebGesture( |
16 const InputMessage& proto, | 16 const InputMessage& proto, |
17 blink::WebInputEvent::Type type) { | 17 blink::WebInputEvent::Type type) { |
18 std::unique_ptr<blink::WebGestureEvent> event(new blink::WebGestureEvent); | 18 std::unique_ptr<blink::WebGestureEvent> event(new blink::WebGestureEvent); |
19 event->type = type; | 19 event->type = type; |
20 event->timeStampSeconds = proto.timestamp_seconds(); | 20 event->timeStampSeconds = proto.timestamp_seconds(); |
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
306 return ImeMessage_InputType_TEXT_AREA; | 306 return ImeMessage_InputType_TEXT_AREA; |
307 case ui::TEXT_INPUT_TYPE_CONTENT_EDITABLE: | 307 case ui::TEXT_INPUT_TYPE_CONTENT_EDITABLE: |
308 return ImeMessage_InputType_CONTENT_EDITABLE; | 308 return ImeMessage_InputType_CONTENT_EDITABLE; |
309 case ui::TEXT_INPUT_TYPE_DATE_TIME_FIELD: | 309 case ui::TEXT_INPUT_TYPE_DATE_TIME_FIELD: |
310 return ImeMessage_InputType_DATE_TIME_FIELD; | 310 return ImeMessage_InputType_DATE_TIME_FIELD; |
311 } | 311 } |
312 return ImeMessage_InputType_NONE; | 312 return ImeMessage_InputType_NONE; |
313 } | 313 } |
314 | 314 |
315 } // namespace blimp | 315 } // namespace blimp |
OLD | NEW |