| 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 SERVICES_UI_WS_TEST_UTILS_H_ | 5 #ifndef SERVICES_UI_WS_TEST_UTILS_H_ |
| 6 #define SERVICES_UI_WS_TEST_UTILS_H_ | 6 #define SERVICES_UI_WS_TEST_UTILS_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 589 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 600 void OnNoMoreDisplays() override; | 600 void OnNoMoreDisplays() override; |
| 601 std::unique_ptr<WindowTreeBinding> CreateWindowTreeBinding( | 601 std::unique_ptr<WindowTreeBinding> CreateWindowTreeBinding( |
| 602 BindingType type, | 602 BindingType type, |
| 603 ws::WindowServer* window_server, | 603 ws::WindowServer* window_server, |
| 604 ws::WindowTree* tree, | 604 ws::WindowTree* tree, |
| 605 mojom::WindowTreeRequest* tree_request, | 605 mojom::WindowTreeRequest* tree_request, |
| 606 mojom::WindowTreeClientPtr* client) override; | 606 mojom::WindowTreeClientPtr* client) override; |
| 607 bool IsTestConfig() const override; | 607 bool IsTestConfig() const override; |
| 608 void OnWillCreateTreeForWindowManager( | 608 void OnWillCreateTreeForWindowManager( |
| 609 bool automatically_create_display_roots) override; | 609 bool automatically_create_display_roots) override; |
| 610 scoped_refptr<base::SingleThreadTaskRunner>& GetResourceRunner() override; |
| 611 base::WeakPtr<ui::ImageCursors> GetImageCursorsWeakPtr() override; |
| 610 | 612 |
| 611 private: | 613 private: |
| 612 WindowServer* window_server_ = nullptr; | 614 WindowServer* window_server_ = nullptr; |
| 613 bool got_on_no_more_displays_ = false; | 615 bool got_on_no_more_displays_ = false; |
| 614 // All TestWindowTreeBinding objects created via CreateWindowTreeBinding. | 616 // All TestWindowTreeBinding objects created via CreateWindowTreeBinding. |
| 615 // These are owned by the corresponding WindowTree. | 617 // These are owned by the corresponding WindowTree. |
| 616 std::vector<TestWindowTreeBinding*> bindings_; | 618 std::vector<TestWindowTreeBinding*> bindings_; |
| 619 scoped_refptr<base::SingleThreadTaskRunner> resource_runner_ = nullptr; |
| 620 std::unique_ptr<ui::ImageCursors> image_cursors_; |
| 617 | 621 |
| 618 DISALLOW_COPY_AND_ASSIGN(TestWindowServerDelegate); | 622 DISALLOW_COPY_AND_ASSIGN(TestWindowServerDelegate); |
| 619 }; | 623 }; |
| 620 | 624 |
| 621 // ----------------------------------------------------------------------------- | 625 // ----------------------------------------------------------------------------- |
| 622 | 626 |
| 623 // Helper class which creates and sets up the necessary objects for tests that | 627 // Helper class which creates and sets up the necessary objects for tests that |
| 624 // use the WindowServer. | 628 // use the WindowServer. |
| 625 class WindowServerTestHelper { | 629 class WindowServerTestHelper { |
| 626 public: | 630 public: |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 759 ClientWindowId* client_id = nullptr); | 763 ClientWindowId* client_id = nullptr); |
| 760 ServerWindow* NewWindowInTreeWithParent(WindowTree* tree, | 764 ServerWindow* NewWindowInTreeWithParent(WindowTree* tree, |
| 761 ServerWindow* parent, | 765 ServerWindow* parent, |
| 762 ClientWindowId* client_id = nullptr); | 766 ClientWindowId* client_id = nullptr); |
| 763 | 767 |
| 764 } // namespace test | 768 } // namespace test |
| 765 } // namespace ws | 769 } // namespace ws |
| 766 } // namespace ui | 770 } // namespace ui |
| 767 | 771 |
| 768 #endif // SERVICES_UI_WS_TEST_UTILS_H_ | 772 #endif // SERVICES_UI_WS_TEST_UTILS_H_ |
| OLD | NEW |