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

Side by Side Diff: ui/aura/window_targeter.cc

Issue 2712963003: mustash: Use ui::chromeos::EventRewriter in mus (Closed)
Patch Set: Fix build issues. Created 3 years, 9 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 | « ui/aura/test/ui_controls_factory_ozone.cc ('k') | ui/aura/window_tree_host.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 (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 "ui/aura/window_targeter.h" 5 #include "ui/aura/window_targeter.h"
6 6
7 #include "ui/aura/client/capture_client.h" 7 #include "ui/aura/client/capture_client.h"
8 #include "ui/aura/client/event_client.h" 8 #include "ui/aura/client/event_client.h"
9 #include "ui/aura/client/focus_client.h" 9 #include "ui/aura/client/focus_client.h"
10 #include "ui/aura/window.h" 10 #include "ui/aura/window.h"
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 // The event has been transformed to be in |target|'s coordinate system. 75 // The event has been transformed to be in |target|'s coordinate system.
76 // But dispatching the event through the EventProcessor requires the event 76 // But dispatching the event through the EventProcessor requires the event
77 // to be in the host's coordinate system. So, convert the event to be in 77 // to be in the host's coordinate system. So, convert the event to be in
78 // the root's coordinate space, and then to the host's coordinate space by 78 // the root's coordinate space, and then to the host's coordinate space by
79 // applying the host's transform. 79 // applying the host's transform.
80 ui::LocatedEvent* located_event = static_cast<ui::LocatedEvent*>(event); 80 ui::LocatedEvent* located_event = static_cast<ui::LocatedEvent*>(event);
81 located_event->ConvertLocationToTarget(target, new_root); 81 located_event->ConvertLocationToTarget(target, new_root);
82 located_event->UpdateForRootTransform( 82 located_event->UpdateForRootTransform(
83 new_root->GetHost()->GetRootTransform()); 83 new_root->GetHost()->GetRootTransform());
84 } 84 }
85 ignore_result( 85 ignore_result(new_root->GetHost()->event_sink()->OnEventFromSource(event));
86 new_root->GetHost()->event_processor()->OnEventFromSource(event));
87 86
88 target = nullptr; 87 target = nullptr;
89 } 88 }
90 return target; 89 return target;
91 } 90 }
92 91
93 ui::EventTarget* WindowTargeter::FindNextBestTarget( 92 ui::EventTarget* WindowTargeter::FindNextBestTarget(
94 ui::EventTarget* previous_target, 93 ui::EventTarget* previous_target,
95 ui::Event* event) { 94 ui::Event* event) {
96 return nullptr; 95 return nullptr;
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 static_cast<Window*>(targeter->FindTargetForEvent(child, event)); 189 static_cast<Window*>(targeter->FindTargetForEvent(child, event));
191 if (child_target_window) 190 if (child_target_window)
192 return child_target_window; 191 return child_target_window;
193 } 192 }
194 target->ConvertEventToTarget(root_window, event); 193 target->ConvertEventToTarget(root_window, event);
195 } 194 }
196 return root_window->CanAcceptEvent(*event) ? root_window : nullptr; 195 return root_window->CanAcceptEvent(*event) ? root_window : nullptr;
197 } 196 }
198 197
199 } // namespace aura 198 } // namespace aura
OLDNEW
« no previous file with comments | « ui/aura/test/ui_controls_factory_ozone.cc ('k') | ui/aura/window_tree_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698