| 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 "services/ui/ws/event_dispatcher.h" | 5 #include "services/ui/ws/event_dispatcher.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <queue> | 10 #include <queue> |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 133 details->window = target; | 133 details->window = target; |
| 134 details->client_id = client_id; | 134 details->client_id = client_id; |
| 135 details->event = ui::Event::Clone(event); | 135 details->event = ui::Event::Clone(event); |
| 136 details->accelerator = accelerator; | 136 details->accelerator = accelerator; |
| 137 dispatched_event_queue_.push(std::move(details)); | 137 dispatched_event_queue_.push(std::move(details)); |
| 138 } | 138 } |
| 139 ClientSpecificId GetEventTargetClientId(const ServerWindow* window, | 139 ClientSpecificId GetEventTargetClientId(const ServerWindow* window, |
| 140 bool in_nonclient_area) override { | 140 bool in_nonclient_area) override { |
| 141 return in_nonclient_area ? kNonclientAreaId : kClientAreaId; | 141 return in_nonclient_area ? kNonclientAreaId : kClientAreaId; |
| 142 } | 142 } |
| 143 ServerWindow* GetRootWindowContaining(const gfx::Point& location) override { | 143 ServerWindow* GetRootWindowContaining(gfx::Point* location) override { |
| 144 return root_; | 144 return root_; |
| 145 } | 145 } |
| 146 void OnEventTargetNotFound(const ui::Event& event) override { | 146 void OnEventTargetNotFound(const ui::Event& event) override { |
| 147 last_event_target_not_found_ = ui::Event::Clone(event); | 147 last_event_target_not_found_ = ui::Event::Clone(event); |
| 148 } | 148 } |
| 149 | 149 |
| 150 Delegate* delegate_; | 150 Delegate* delegate_; |
| 151 ServerWindow* focused_window_; | 151 ServerWindow* focused_window_; |
| 152 ServerWindow* lost_capture_window_; | 152 ServerWindow* lost_capture_window_; |
| 153 uint32_t last_accelerator_; | 153 uint32_t last_accelerator_; |
| (...skipping 1552 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1706 // The delegate can decide if it really wants to forward the event or not. | 1706 // The delegate can decide if it really wants to forward the event or not. |
| 1707 EXPECT_EQ(child.get(), | 1707 EXPECT_EQ(child.get(), |
| 1708 test_event_dispatcher_delegate()->lost_capture_window()); | 1708 test_event_dispatcher_delegate()->lost_capture_window()); |
| 1709 EXPECT_EQ(child.get(), event_dispatcher()->capture_window()); | 1709 EXPECT_EQ(child.get(), event_dispatcher()->capture_window()); |
| 1710 EXPECT_EQ(kClientAreaId, event_dispatcher()->capture_window_client_id()); | 1710 EXPECT_EQ(kClientAreaId, event_dispatcher()->capture_window_client_id()); |
| 1711 } | 1711 } |
| 1712 | 1712 |
| 1713 } // namespace test | 1713 } // namespace test |
| 1714 } // namespace ws | 1714 } // namespace ws |
| 1715 } // namespace ui | 1715 } // namespace ui |
| OLD | NEW |