| 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 "ash/host/ash_window_tree_host_unified.h" | 5 #include "ash/host/ash_window_tree_host_unified.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "ash/host/root_window_transformer.h" | 9 #include "ash/host/root_window_transformer.h" |
| 10 #include "ash/ime/input_method_event_handler.h" | 10 #include "ash/ime/input_method_event_handler.h" |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 | 26 |
| 27 ui::EventTarget* FindTargetForEvent(ui::EventTarget* root, | 27 ui::EventTarget* FindTargetForEvent(ui::EventTarget* root, |
| 28 ui::Event* event) override { | 28 ui::Event* event) override { |
| 29 if (root == src_root_ && !event->target()) { | 29 if (root == src_root_ && !event->target()) { |
| 30 if (event->IsLocatedEvent()) { | 30 if (event->IsLocatedEvent()) { |
| 31 ui::LocatedEvent* located_event = static_cast<ui::LocatedEvent*>(event); | 31 ui::LocatedEvent* located_event = static_cast<ui::LocatedEvent*>(event); |
| 32 located_event->ConvertLocationToTarget( | 32 located_event->ConvertLocationToTarget( |
| 33 static_cast<aura::Window*>(nullptr), dst_root_); | 33 static_cast<aura::Window*>(nullptr), dst_root_); |
| 34 } | 34 } |
| 35 ignore_result( | 35 ignore_result( |
| 36 dst_root_->GetHost()->event_processor()->OnEventFromSource(event)); | 36 dst_root_->GetHost()->event_sink()->OnEventFromSource(event)); |
| 37 return nullptr; | 37 return nullptr; |
| 38 } else { | 38 } else { |
| 39 NOTREACHED() << "event type:" << event->type(); | 39 NOTREACHED() << "event type:" << event->type(); |
| 40 return aura::WindowTargeter::FindTargetForEvent(root, event); | 40 return aura::WindowTargeter::FindTargetForEvent(root, event); |
| 41 } | 41 } |
| 42 } | 42 } |
| 43 | 43 |
| 44 aura::Window* src_root_; | 44 aura::Window* src_root_; |
| 45 aura::Window* dst_root_; | 45 aura::Window* dst_root_; |
| 46 | 46 |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 std::find_if(mirroring_hosts_.begin(), mirroring_hosts_.end(), | 103 std::find_if(mirroring_hosts_.begin(), mirroring_hosts_.end(), |
| 104 [window](AshWindowTreeHost* ash_host) { | 104 [window](AshWindowTreeHost* ash_host) { |
| 105 return ash_host->AsWindowTreeHost()->window() == window; | 105 return ash_host->AsWindowTreeHost()->window() == window; |
| 106 }); | 106 }); |
| 107 DCHECK(iter != mirroring_hosts_.end()); | 107 DCHECK(iter != mirroring_hosts_.end()); |
| 108 window->RemoveObserver(this); | 108 window->RemoveObserver(this); |
| 109 mirroring_hosts_.erase(iter); | 109 mirroring_hosts_.erase(iter); |
| 110 } | 110 } |
| 111 | 111 |
| 112 } // namespace ash | 112 } // namespace ash |
| OLD | NEW |