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 "components/view_manager/event_dispatcher.h" | 5 #include "components/view_manager/event_dispatcher.h" |
6 | 6 |
7 #include "components/view_manager/connection_manager.h" | 7 #include "components/view_manager/connection_manager.h" |
8 #include "components/view_manager/server_view.h" | 8 #include "components/view_manager/server_view.h" |
9 #include "components/view_manager/view_coordinate_conversions.h" | 9 #include "components/view_manager/view_coordinate_conversions.h" |
10 #include "components/view_manager/view_locator.h" | 10 #include "components/view_manager/view_locator.h" |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 } | 46 } |
47 const gfx::PointF local_point(ConvertPointFBetweenViews( | 47 const gfx::PointF local_point(ConvertPointFBetweenViews( |
48 connection_manager_->root(), target, | 48 connection_manager_->root(), target, |
49 gfx::PointF(event->pointer_data->x, event->pointer_data->y))); | 49 gfx::PointF(event->pointer_data->x, event->pointer_data->y))); |
50 event->pointer_data->x = local_point.x(); | 50 event->pointer_data->x = local_point.x(); |
51 event->pointer_data->y = local_point.y(); | 51 event->pointer_data->y = local_point.y(); |
52 connection_manager_->DispatchInputEventToView(target, event.Pass()); | 52 connection_manager_->DispatchInputEventToView(target, event.Pass()); |
53 } else if (event->action == mojo::EVENT_TYPE_KEY_PRESSED && | 53 } else if (event->action == mojo::EVENT_TYPE_KEY_PRESSED && |
54 accelerators_.count(Accelerator(event->key_data->windows_key_code, | 54 accelerators_.count(Accelerator(event->key_data->windows_key_code, |
55 event->flags))) { | 55 event->flags))) { |
56 connection_manager_->wm_internal()->OnAccelerator(event.Pass()); | 56 connection_manager_->view_manager_root_client()->OnAccelerator( |
| 57 event.Pass()); |
57 } else { | 58 } else { |
58 ServerView* focused_view = connection_manager_->GetFocusedView(); | 59 ServerView* focused_view = connection_manager_->GetFocusedView(); |
59 if (focused_view) | 60 if (focused_view) |
60 connection_manager_->DispatchInputEventToView(focused_view, event.Pass()); | 61 connection_manager_->DispatchInputEventToView(focused_view, event.Pass()); |
61 } | 62 } |
62 } | 63 } |
63 | 64 |
64 } // namespace view_manager | 65 } // namespace view_manager |
OLD | NEW |