| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "components/mus/ws/test_utils.h" | 5 #include "components/mus/ws/test_utils.h" |
| 6 | 6 |
| 7 #include "base/memory/ptr_util.h" | 7 #include "base/memory/ptr_util.h" |
| 8 #include "cc/output/copy_output_request.h" | 8 #include "cc/output/copy_output_request.h" |
| 9 #include "components/mus/surfaces/surfaces_state.h" | 9 #include "components/mus/surfaces/surfaces_state.h" |
| 10 #include "components/mus/ws/display_binding.h" | 10 #include "components/mus/ws/display_binding.h" |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 156 uint32_t change_id, | 156 uint32_t change_id, |
| 157 ClientSpecificId requesting_client_id, | 157 ClientSpecificId requesting_client_id, |
| 158 mojo::Map<mojo::String, mojo::Array<uint8_t>> properties) { | 158 mojo::Map<mojo::String, mojo::Array<uint8_t>> properties) { |
| 159 got_create_top_level_window_ = true; | 159 got_create_top_level_window_ = true; |
| 160 change_id_ = change_id; | 160 change_id_ = change_id; |
| 161 } | 161 } |
| 162 | 162 |
| 163 void TestWindowManager::WmClientJankinessChanged(ClientSpecificId client_id, | 163 void TestWindowManager::WmClientJankinessChanged(ClientSpecificId client_id, |
| 164 bool janky) {} | 164 bool janky) {} |
| 165 | 165 |
| 166 void TestWindowManager::WmPerformMoveLoop(uint32_t change_id, |
| 167 uint32_t window_id, |
| 168 const gfx::Point& cursor_location) { |
| 169 on_perform_move_loop_called_ = true; |
| 170 } |
| 171 |
| 172 void TestWindowManager::WmCancelMoveLoop(uint32_t window_id) {} |
| 173 |
| 166 void TestWindowManager::OnAccelerator(uint32_t id, | 174 void TestWindowManager::OnAccelerator(uint32_t id, |
| 167 std::unique_ptr<ui::Event> event) { | 175 std::unique_ptr<ui::Event> event) { |
| 168 on_accelerator_called_ = true; | 176 on_accelerator_called_ = true; |
| 169 on_accelerator_id_ = id; | 177 on_accelerator_id_ = id; |
| 170 } | 178 } |
| 171 | 179 |
| 172 // TestWindowTreeClient ------------------------------------------------------- | 180 // TestWindowTreeClient ------------------------------------------------------- |
| 173 | 181 |
| 174 TestWindowTreeClient::TestWindowTreeClient() | 182 TestWindowTreeClient::TestWindowTreeClient() |
| 175 : binding_(this), record_on_change_completed_(false) {} | 183 : binding_(this), record_on_change_completed_(false) {} |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 289 uint32_t window_id, | 297 uint32_t window_id, |
| 290 mojom::Cursor cursor_id) { | 298 mojom::Cursor cursor_id) { |
| 291 tracker_.OnWindowPredefinedCursorChanged(window_id, cursor_id); | 299 tracker_.OnWindowPredefinedCursorChanged(window_id, cursor_id); |
| 292 } | 300 } |
| 293 | 301 |
| 294 void TestWindowTreeClient::OnChangeCompleted(uint32_t change_id, bool success) { | 302 void TestWindowTreeClient::OnChangeCompleted(uint32_t change_id, bool success) { |
| 295 if (record_on_change_completed_) | 303 if (record_on_change_completed_) |
| 296 tracker_.OnChangeCompleted(change_id, success); | 304 tracker_.OnChangeCompleted(change_id, success); |
| 297 } | 305 } |
| 298 | 306 |
| 307 void TestWindowTreeClient::OnMoveLoopCompleted(uint32_t change_id, |
| 308 bool success) { |
| 309 if (record_on_change_completed_) |
| 310 tracker_.OnChangeCompleted(change_id, success); |
| 311 } |
| 312 |
| 299 void TestWindowTreeClient::RequestClose(uint32_t window_id) {} | 313 void TestWindowTreeClient::RequestClose(uint32_t window_id) {} |
| 300 | 314 |
| 301 void TestWindowTreeClient::GetWindowManager( | 315 void TestWindowTreeClient::GetWindowManager( |
| 302 mojo::AssociatedInterfaceRequest<mojom::WindowManager> internal) {} | 316 mojo::AssociatedInterfaceRequest<mojom::WindowManager> internal) {} |
| 303 | 317 |
| 304 // TestWindowTreeBinding ------------------------------------------------------ | 318 // TestWindowTreeBinding ------------------------------------------------------ |
| 305 | 319 |
| 306 TestWindowTreeBinding::TestWindowTreeBinding(WindowTree* tree) | 320 TestWindowTreeBinding::TestWindowTreeBinding(WindowTree* tree) |
| 307 : WindowTreeBinding(&client_), tree_(tree) {} | 321 : WindowTreeBinding(&client_), tree_(tree) {} |
| 308 TestWindowTreeBinding::~TestWindowTreeBinding() {} | 322 TestWindowTreeBinding::~TestWindowTreeBinding() {} |
| (...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 483 return nullptr; | 497 return nullptr; |
| 484 if (!tree->AddWindow(parent_client_id, client_window_id)) | 498 if (!tree->AddWindow(parent_client_id, client_window_id)) |
| 485 return nullptr; | 499 return nullptr; |
| 486 *client_id = client_window_id; | 500 *client_id = client_window_id; |
| 487 return tree->GetWindowByClientId(client_window_id); | 501 return tree->GetWindowByClientId(client_window_id); |
| 488 } | 502 } |
| 489 | 503 |
| 490 } // namespace test | 504 } // namespace test |
| 491 } // namespace ws | 505 } // namespace ws |
| 492 } // namespace mus | 506 } // namespace mus |
| OLD | NEW |