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

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

Issue 1138073007: Nukes the windowmanager interface (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge Created 5 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
« no previous file with comments | « components/view_manager/event_dispatcher.h ('k') | components/view_manager/public/cpp/BUILD.gn » ('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/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
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
OLDNEW
« no previous file with comments | « components/view_manager/event_dispatcher.h ('k') | components/view_manager/public/cpp/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698