| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/window_tree.h" | 5 #include "services/ui/ws/window_tree.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 return window_event_targeting_helper_.wm_client(); | 140 return window_event_targeting_helper_.wm_client(); |
| 141 } | 141 } |
| 142 WindowServer* window_server() { | 142 WindowServer* window_server() { |
| 143 return window_event_targeting_helper_.window_server(); | 143 return window_event_targeting_helper_.window_server(); |
| 144 } | 144 } |
| 145 WindowTree* wm_tree() { | 145 WindowTree* wm_tree() { |
| 146 return window_event_targeting_helper_.window_server()->GetTreeWithId(1); | 146 return window_event_targeting_helper_.window_server()->GetTreeWithId(1); |
| 147 } | 147 } |
| 148 | 148 |
| 149 void DispatchEventWithoutAck(const ui::Event& event) { | 149 void DispatchEventWithoutAck(const ui::Event& event) { |
| 150 DisplayTestApi(display()).OnEvent(event); | 150 std::unique_ptr<Event> tmp = ui::Event::Clone(event); |
| 151 DisplayTestApi(display()).OnEvent(tmp.get()); |
| 151 } | 152 } |
| 152 | 153 |
| 153 void set_window_manager_internal(WindowTree* tree, | 154 void set_window_manager_internal(WindowTree* tree, |
| 154 mojom::WindowManager* wm_internal) { | 155 mojom::WindowManager* wm_internal) { |
| 155 WindowTreeTestApi(tree).set_window_manager_internal(wm_internal); | 156 WindowTreeTestApi(tree).set_window_manager_internal(wm_internal); |
| 156 } | 157 } |
| 157 | 158 |
| 158 void AckPreviousEvent() { | 159 void AckPreviousEvent() { |
| 159 WindowManagerStateTestApi test_api( | 160 WindowManagerStateTestApi test_api( |
| 160 display()->GetActiveWindowManagerDisplayRoot()->window_manager_state()); | 161 display()->GetActiveWindowManagerDisplayRoot()->window_manager_state()); |
| (...skipping 1300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1461 client->tracker()->changes()->clear(); | 1462 client->tracker()->changes()->clear(); |
| 1462 } | 1463 } |
| 1463 | 1464 |
| 1464 // Client should not have got any messages after shutdown. | 1465 // Client should not have got any messages after shutdown. |
| 1465 EXPECT_TRUE(client->tracker()->changes()->empty()); | 1466 EXPECT_TRUE(client->tracker()->changes()->empty()); |
| 1466 } | 1467 } |
| 1467 | 1468 |
| 1468 } // namespace test | 1469 } // namespace test |
| 1469 } // namespace ws | 1470 } // namespace ws |
| 1470 } // namespace ui | 1471 } // namespace ui |
| OLD | NEW |