| 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 <stddef.h> | 5 #include <stddef.h> |
| 6 #include <stdint.h> | 6 #include <stdint.h> |
| 7 | 7 |
| 8 #include "base/bind.h" | 8 #include "base/bind.h" |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
| 11 #include "base/run_loop.h" | 11 #include "base/run_loop.h" |
| 12 #include "base/strings/stringprintf.h" | 12 #include "base/strings/stringprintf.h" |
| 13 #include "components/mus/public/cpp/tests/window_server_shelltest_base.h" | 13 #include "components/mus/public/cpp/tests/window_server_shelltest_base.h" |
| 14 #include "components/mus/public/interfaces/window_tree.mojom.h" | 14 #include "components/mus/public/interfaces/window_tree.mojom.h" |
| 15 #include "components/mus/public/interfaces/window_tree_host.mojom.h" | 15 #include "components/mus/public/interfaces/window_tree_host.mojom.h" |
| 16 #include "components/mus/ws/ids.h" | 16 #include "components/mus/ws/ids.h" |
| 17 #include "components/mus/ws/test_change_tracker.h" | 17 #include "components/mus/ws/test_change_tracker.h" |
| 18 #include "mojo/public/cpp/bindings/associated_binding.h" | 18 #include "mojo/public/cpp/bindings/associated_binding.h" |
| 19 #include "services/shell/public/cpp/shell_test.h" | 19 #include "services/shell/public/cpp/shell_test.h" |
| 20 | 20 |
| 21 using mojo::Array; | 21 using mojo::Array; |
| 22 using mojo::Callback; | 22 using mojo::Callback; |
| 23 using shell::Connection; | 23 using shell::Connection; |
| 24 using mojo::InterfaceRequest; | 24 using mojo::InterfaceRequest; |
| 25 using shell::ShellClient; | 25 using shell::ShellClient; |
| 26 using mojo::String; | 26 using mojo::String; |
| 27 using mus::mojom::ErrorCode; | |
| 28 using mus::mojom::WindowDataPtr; | 27 using mus::mojom::WindowDataPtr; |
| 29 using mus::mojom::WindowTree; | 28 using mus::mojom::WindowTree; |
| 30 using mus::mojom::WindowTreeClient; | 29 using mus::mojom::WindowTreeClient; |
| 31 | 30 |
| 32 namespace mus { | 31 namespace mus { |
| 33 namespace ws { | 32 namespace ws { |
| 34 namespace test { | 33 namespace test { |
| 35 | 34 |
| 36 namespace { | 35 namespace { |
| 37 | 36 |
| (...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 380 void GetWindowManager(mojo::AssociatedInterfaceRequest<mojom::WindowManager> | 379 void GetWindowManager(mojo::AssociatedInterfaceRequest<mojom::WindowManager> |
| 381 internal) override { | 380 internal) override { |
| 382 window_manager_binding_.reset( | 381 window_manager_binding_.reset( |
| 383 new mojo::AssociatedBinding<mojom::WindowManager>(this, | 382 new mojo::AssociatedBinding<mojom::WindowManager>(this, |
| 384 std::move(internal))); | 383 std::move(internal))); |
| 385 tree_->GetWindowManagerClient( | 384 tree_->GetWindowManagerClient( |
| 386 GetProxy(&window_manager_client_, tree_.associated_group())); | 385 GetProxy(&window_manager_client_, tree_.associated_group())); |
| 387 } | 386 } |
| 388 | 387 |
| 389 // mojom::WindowManager: | 388 // mojom::WindowManager: |
| 389 void OnConnect(uint16_t client_id) override {} |
| 390 void WmNewDisplayAdded(mojom::DisplayPtr display, |
| 391 mojom::WindowDataPtr root_data, |
| 392 bool drawn) override { |
| 393 NOTIMPLEMENTED(); |
| 394 } |
| 390 void WmSetBounds(uint32_t change_id, | 395 void WmSetBounds(uint32_t change_id, |
| 391 uint32_t window_id, | 396 uint32_t window_id, |
| 392 const gfx::Rect& bounds) override { | 397 const gfx::Rect& bounds) override { |
| 393 window_manager_client_->WmResponse(change_id, false); | 398 window_manager_client_->WmResponse(change_id, false); |
| 394 } | 399 } |
| 395 void WmSetProperty(uint32_t change_id, | 400 void WmSetProperty(uint32_t change_id, |
| 396 uint32_t window_id, | 401 uint32_t window_id, |
| 397 const mojo::String& name, | 402 const mojo::String& name, |
| 398 mojo::Array<uint8_t> value) override { | 403 mojo::Array<uint8_t> value) override { |
| 399 window_manager_client_->WmResponse(change_id, false); | 404 window_manager_client_->WmResponse(change_id, false); |
| (...skipping 1627 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2027 | 2032 |
| 2028 // TODO(sky): make sure coverage of what was | 2033 // TODO(sky): make sure coverage of what was |
| 2029 // WindowManagerTest.SecondEmbedRoot_InitService and | 2034 // WindowManagerTest.SecondEmbedRoot_InitService and |
| 2030 // WindowManagerTest.MultipleEmbedRootsBeforeWTHReady gets added to window | 2035 // WindowManagerTest.MultipleEmbedRootsBeforeWTHReady gets added to window |
| 2031 // manager | 2036 // manager |
| 2032 // tests. | 2037 // tests. |
| 2033 | 2038 |
| 2034 } // namespace test | 2039 } // namespace test |
| 2035 } // namespace ws | 2040 } // namespace ws |
| 2036 } // namespace mus | 2041 } // namespace mus |
| OLD | NEW |