| 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 "cc/output/copy_output_request.h" | 7 #include "cc/output/copy_output_request.h" |
| 8 #include "components/mus/surfaces/surfaces_state.h" | 8 #include "components/mus/surfaces/surfaces_state.h" |
| 9 #include "components/mus/ws/display_binding.h" | 9 #include "components/mus/ws/display_binding.h" |
| 10 #include "components/mus/ws/window_manager_factory_service.h" | 10 #include "components/mus/ws/window_manager_factory_service.h" |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 // WindowTreeTestApi --------------------------------------------------------- | 97 // WindowTreeTestApi --------------------------------------------------------- |
| 98 | 98 |
| 99 WindowTreeTestApi::WindowTreeTestApi(WindowTree* tree) : tree_(tree) {} | 99 WindowTreeTestApi::WindowTreeTestApi(WindowTree* tree) : tree_(tree) {} |
| 100 WindowTreeTestApi::~WindowTreeTestApi() {} | 100 WindowTreeTestApi::~WindowTreeTestApi() {} |
| 101 | 101 |
| 102 // DisplayTestApi ------------------------------------------------------------ | 102 // DisplayTestApi ------------------------------------------------------------ |
| 103 | 103 |
| 104 DisplayTestApi::DisplayTestApi(Display* display) : display_(display) {} | 104 DisplayTestApi::DisplayTestApi(Display* display) : display_(display) {} |
| 105 DisplayTestApi::~DisplayTestApi() {} | 105 DisplayTestApi::~DisplayTestApi() {} |
| 106 | 106 |
| 107 // EventDispatcherTestApi ---------------------------------------------------- |
| 108 |
| 109 int EventDispatcherTestApi::NumberPointerTargetsForWindow( |
| 110 ServerWindow* window) { |
| 111 int count = 0; |
| 112 for (const auto& pair : ed_->pointer_targets_) |
| 113 if (pair.second.window == window) |
| 114 count++; |
| 115 return count; |
| 116 } |
| 117 |
| 107 // TestWindowTreeClient ------------------------------------------------------- | 118 // TestWindowTreeClient ------------------------------------------------------- |
| 108 | 119 |
| 109 TestWindowTreeClient::TestWindowTreeClient() | 120 TestWindowTreeClient::TestWindowTreeClient() |
| 110 : binding_(this), record_on_change_completed_(false) {} | 121 : binding_(this), record_on_change_completed_(false) {} |
| 111 TestWindowTreeClient::~TestWindowTreeClient() {} | 122 TestWindowTreeClient::~TestWindowTreeClient() {} |
| 112 | 123 |
| 113 void TestWindowTreeClient::Bind( | 124 void TestWindowTreeClient::Bind( |
| 114 mojo::InterfaceRequest<mojom::WindowTreeClient> request) { | 125 mojo::InterfaceRequest<mojom::WindowTreeClient> request) { |
| 115 binding_.Bind(std::move(request)); | 126 binding_.Bind(std::move(request)); |
| 116 } | 127 } |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 271 Display* display = | 282 Display* display = |
| 272 new Display(connection_manager_, nullptr, scoped_refptr<GpuState>(), | 283 new Display(connection_manager_, nullptr, scoped_refptr<GpuState>(), |
| 273 scoped_refptr<mus::SurfacesState>()); | 284 scoped_refptr<mus::SurfacesState>()); |
| 274 display->Init(nullptr); | 285 display->Init(nullptr); |
| 275 } | 286 } |
| 276 } | 287 } |
| 277 | 288 |
| 278 } // namespace test | 289 } // namespace test |
| 279 } // namespace ws | 290 } // namespace ws |
| 280 } // namespace mus | 291 } // namespace mus |
| OLD | NEW |