| 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 <stdint.h> | 5 #include <stdint.h> |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 191 } | 191 } |
| 192 | 192 |
| 193 void set_window_manager_internal(WindowTree* tree, | 193 void set_window_manager_internal(WindowTree* tree, |
| 194 mojom::WindowManager* wm_internal) { | 194 mojom::WindowManager* wm_internal) { |
| 195 WindowTreeTestApi(tree).set_window_manager_internal(wm_internal); | 195 WindowTreeTestApi(tree).set_window_manager_internal(wm_internal); |
| 196 } | 196 } |
| 197 | 197 |
| 198 void AckPreviousEvent() { | 198 void AckPreviousEvent() { |
| 199 DisplayTestApi test_api(display_); | 199 DisplayTestApi test_api(display_); |
| 200 while (test_api.tree_awaiting_input_ack()) | 200 while (test_api.tree_awaiting_input_ack()) |
| 201 test_api.tree_awaiting_input_ack()->OnWindowInputEventAck(0); | 201 test_api.tree_awaiting_input_ack()->OnWindowInputEventAck(0, true); |
| 202 } | 202 } |
| 203 | 203 |
| 204 void DispatchEventAndAckImmediately(const ui::Event& event) { | 204 void DispatchEventAndAckImmediately(const ui::Event& event) { |
| 205 DispatchEventWithoutAck(event); | 205 DispatchEventWithoutAck(event); |
| 206 AckPreviousEvent(); | 206 AckPreviousEvent(); |
| 207 } | 207 } |
| 208 | 208 |
| 209 // Creates a new window from wm_tree() and embeds a new connection in | 209 // Creates a new window from wm_tree() and embeds a new connection in |
| 210 // it. | 210 // it. |
| 211 void SetupEventTargeting(TestWindowTreeClient** out_client, | 211 void SetupEventTargeting(TestWindowTreeClient** out_client, |
| (...skipping 443 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 655 WindowIdToTransportId(root_window->id())); | 655 WindowIdToTransportId(root_window->id())); |
| 656 EXPECT_EQ(window, display->GetCaptureWindow()); | 656 EXPECT_EQ(window, display->GetCaptureWindow()); |
| 657 mojom_window_tree->ReleaseCapture(++change_id, | 657 mojom_window_tree->ReleaseCapture(++change_id, |
| 658 WindowIdToTransportId(window->id())); | 658 WindowIdToTransportId(window->id())); |
| 659 EXPECT_EQ(nullptr, display->GetCaptureWindow()); | 659 EXPECT_EQ(nullptr, display->GetCaptureWindow()); |
| 660 } | 660 } |
| 661 | 661 |
| 662 } // namespace test | 662 } // namespace test |
| 663 } // namespace ws | 663 } // namespace ws |
| 664 } // namespace mus | 664 } // namespace mus |
| OLD | NEW |