Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(345)

Side by Side Diff: ui/events/mojo/input_events_type_converters.cc

Issue 2014003002: mojo/converters/input_events -> ui/events/mojo (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@converters
Patch Set: . Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "mojo/converters/input_events/input_events_type_converters.h" 5 #include "ui/events/mojo/input_events_type_converters.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <utility> 9 #include <utility>
10 10
11 #if defined(USE_X11) 11 #if defined(USE_X11)
12 #include <X11/extensions/XInput2.h> 12 #include <X11/extensions/XInput2.h>
13 #include <X11/Xlib.h> 13 #include <X11/Xlib.h>
14 #endif 14 #endif
15 15
16 #include "components/mus/public/interfaces/input_events.mojom.h" 16 #include "components/mus/public/interfaces/input_events.mojom.h"
17 #include "mojo/converters/input_events/mojo_extended_key_event_data.h"
18 #include "ui/events/event_utils.h" 17 #include "ui/events/event_utils.h"
19 #include "ui/events/keycodes/dom/keycode_converter.h" 18 #include "ui/events/keycodes/dom/keycode_converter.h"
20 #include "ui/events/keycodes/keyboard_codes.h" 19 #include "ui/events/keycodes/keyboard_codes.h"
20 #include "ui/events/mojo/mojo_extended_key_event_data.h"
21 #include "ui/gfx/geometry/mojo/geometry_type_converters.h" 21 #include "ui/gfx/geometry/mojo/geometry_type_converters.h"
22 22
23 namespace mojo { 23 namespace mojo {
24 namespace { 24 namespace {
25 25
26 ui::EventType MojoMouseEventTypeToUIEvent(const mus::mojom::EventPtr& event) { 26 ui::EventType MojoMouseEventTypeToUIEvent(const mus::mojom::EventPtr& event) {
27 DCHECK(event->pointer_data); 27 DCHECK(event->pointer_data);
28 DCHECK_EQ(mus::mojom::PointerKind::MOUSE, event->pointer_data->kind); 28 DCHECK_EQ(mus::mojom::PointerKind::MOUSE, event->pointer_data->kind);
29 switch (event->action) { 29 switch (event->action) {
30 case mus::mojom::EventType::POINTER_DOWN: 30 case mus::mojom::EventType::POINTER_DOWN:
(...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after
412 } break; 412 } break;
413 413
414 default: 414 default:
415 NOTIMPLEMENTED(); 415 NOTIMPLEMENTED();
416 } 416 }
417 // TODO: need to support time_stamp. 417 // TODO: need to support time_stamp.
418 return nullptr; 418 return nullptr;
419 } 419 }
420 420
421 } // namespace mojo 421 } // namespace mojo
OLDNEW
« no previous file with comments | « ui/events/mojo/input_events_type_converters.h ('k') | ui/events/mojo/mojo_extended_key_event_data.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698