| 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 #ifndef COMPONENTS_MUS_WS_TEST_UTILS_H_ | 5 #ifndef COMPONENTS_MUS_WS_TEST_UTILS_H_ |
| 6 #define COMPONENTS_MUS_WS_TEST_UTILS_H_ | 6 #define COMPONENTS_MUS_WS_TEST_UTILS_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 319 bool is_paused() const { return is_paused_; } | 319 bool is_paused() const { return is_paused_; } |
| 320 | 320 |
| 321 // WindowTreeBinding: | 321 // WindowTreeBinding: |
| 322 mojom::WindowManager* GetWindowManager() override; | 322 mojom::WindowManager* GetWindowManager() override; |
| 323 void SetIncomingMethodCallProcessingPaused(bool paused) override; | 323 void SetIncomingMethodCallProcessingPaused(bool paused) override; |
| 324 | 324 |
| 325 private: | 325 private: |
| 326 WindowTree* tree_; | 326 WindowTree* tree_; |
| 327 TestWindowTreeClient client_; | 327 TestWindowTreeClient client_; |
| 328 bool is_paused_ = false; | 328 bool is_paused_ = false; |
| 329 scoped_ptr<TestWindowManager> window_manager_; | 329 std::unique_ptr<TestWindowManager> window_manager_; |
| 330 | 330 |
| 331 DISALLOW_COPY_AND_ASSIGN(TestWindowTreeBinding); | 331 DISALLOW_COPY_AND_ASSIGN(TestWindowTreeBinding); |
| 332 }; | 332 }; |
| 333 | 333 |
| 334 // ----------------------------------------------------------------------------- | 334 // ----------------------------------------------------------------------------- |
| 335 | 335 |
| 336 // WindowServerDelegate that creates TestWindowTreeClients. | 336 // WindowServerDelegate that creates TestWindowTreeClients. |
| 337 class TestWindowServerDelegate : public WindowServerDelegate { | 337 class TestWindowServerDelegate : public WindowServerDelegate { |
| 338 public: | 338 public: |
| 339 TestWindowServerDelegate(); | 339 TestWindowServerDelegate(); |
| (...skipping 15 matching lines...) Expand all Loading... |
| 355 } | 355 } |
| 356 | 356 |
| 357 std::vector<TestWindowTreeBinding*>* bindings() { return &bindings_; } | 357 std::vector<TestWindowTreeBinding*>* bindings() { return &bindings_; } |
| 358 | 358 |
| 359 bool got_on_no_more_displays() const { return got_on_no_more_displays_; } | 359 bool got_on_no_more_displays() const { return got_on_no_more_displays_; } |
| 360 | 360 |
| 361 Display* AddDisplay(); | 361 Display* AddDisplay(); |
| 362 | 362 |
| 363 // WindowServerDelegate: | 363 // WindowServerDelegate: |
| 364 void OnNoMoreDisplays() override; | 364 void OnNoMoreDisplays() override; |
| 365 scoped_ptr<WindowTreeBinding> CreateWindowTreeBinding( | 365 std::unique_ptr<WindowTreeBinding> CreateWindowTreeBinding( |
| 366 BindingType type, | 366 BindingType type, |
| 367 ws::WindowServer* window_server, | 367 ws::WindowServer* window_server, |
| 368 ws::WindowTree* tree, | 368 ws::WindowTree* tree, |
| 369 mojom::WindowTreeRequest* tree_request, | 369 mojom::WindowTreeRequest* tree_request, |
| 370 mojom::WindowTreeClientPtr* client) override; | 370 mojom::WindowTreeClientPtr* client) override; |
| 371 void CreateDefaultDisplays() override; | 371 void CreateDefaultDisplays() override; |
| 372 bool IsTestConfig() const override; | 372 bool IsTestConfig() const override; |
| 373 | 373 |
| 374 private: | 374 private: |
| 375 // If CreateDefaultDisplays() this is the number of Displays that are | 375 // If CreateDefaultDisplays() this is the number of Displays that are |
| (...skipping 25 matching lines...) Expand all Loading... |
| 401 | 401 |
| 402 // Creates a new visible window as a child of the single root of |tree|. | 402 // Creates a new visible window as a child of the single root of |tree|. |
| 403 // |client_id| set to the ClientWindowId of the new window. | 403 // |client_id| set to the ClientWindowId of the new window. |
| 404 ServerWindow* NewWindowInTree(WindowTree* tree, ClientWindowId* client_id); | 404 ServerWindow* NewWindowInTree(WindowTree* tree, ClientWindowId* client_id); |
| 405 | 405 |
| 406 } // namespace test | 406 } // namespace test |
| 407 } // namespace ws | 407 } // namespace ws |
| 408 } // namespace mus | 408 } // namespace mus |
| 409 | 409 |
| 410 #endif // COMPONENTS_MUS_WS_TEST_UTILS_H_ | 410 #endif // COMPONENTS_MUS_WS_TEST_UTILS_H_ |
| OLD | NEW |