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

Side by Side Diff: components/mus/event_dispatcher.cc

Issue 1344573002: Mandoline: Rename components/view_manager to components/mus (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 5 years, 3 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
« no previous file with comments | « components/mus/event_dispatcher.h ('k') | components/mus/focus_controller.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "components/view_manager/event_dispatcher.h" 5 #include "components/mus/event_dispatcher.h"
6 6
7 #include "components/view_manager/server_view.h" 7 #include "components/mus/server_view.h"
8 #include "components/view_manager/view_coordinate_conversions.h" 8 #include "components/mus/view_coordinate_conversions.h"
9 #include "components/view_manager/view_locator.h" 9 #include "components/mus/view_locator.h"
10 #include "components/view_manager/view_tree_host_impl.h" 10 #include "components/mus/view_tree_host_impl.h"
11 #include "ui/gfx/geometry/point.h" 11 #include "ui/gfx/geometry/point.h"
12 #include "ui/gfx/geometry/point_f.h" 12 #include "ui/gfx/geometry/point_f.h"
13 13
14 namespace view_manager { 14 namespace view_manager {
15 15
16 EventDispatcher::EventDispatcher(ViewTreeHostImpl* view_tree_host) 16 EventDispatcher::EventDispatcher(ViewTreeHostImpl* view_tree_host)
17 : view_tree_host_(view_tree_host) { 17 : view_tree_host_(view_tree_host) {}
18 }
19 18
20 EventDispatcher::~EventDispatcher() { 19 EventDispatcher::~EventDispatcher() {}
21 }
22 20
23 void EventDispatcher::AddAccelerator(uint32_t id, 21 void EventDispatcher::AddAccelerator(uint32_t id,
24 mojo::KeyboardCode keyboard_code, 22 mojo::KeyboardCode keyboard_code,
25 mojo::EventFlags flags) { 23 mojo::EventFlags flags) {
26 #if !defined(NDEBUG) 24 #if !defined(NDEBUG)
27 for (const auto& pair : accelerators_) { 25 for (const auto& pair : accelerators_) {
28 DCHECK(pair.first != id); 26 DCHECK(pair.first != id);
29 DCHECK(pair.second.keyboard_code != keyboard_code || 27 DCHECK(pair.second.keyboard_code != keyboard_code ||
30 pair.second.flags != flags); 28 pair.second.flags != flags);
31 } 29 }
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 gfx::PointF(event->pointer_data->x, event->pointer_data->y))); 86 gfx::PointF(event->pointer_data->x, event->pointer_data->y)));
89 event->pointer_data->x = local_point.x(); 87 event->pointer_data->x = local_point.x();
90 event->pointer_data->y = local_point.y(); 88 event->pointer_data->y = local_point.y();
91 return target; 89 return target;
92 } 90 }
93 91
94 return focused_view; 92 return focused_view;
95 } 93 }
96 94
97 } // namespace view_manager 95 } // namespace view_manager
OLDNEW
« no previous file with comments | « components/mus/event_dispatcher.h ('k') | components/mus/focus_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698