| 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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 int64_t AddDisplay(const display::ViewportMetrics& metrics); | 59 int64_t AddDisplay(const display::ViewportMetrics& metrics); |
| 60 | 60 |
| 61 // Calls OnDisplayModified() on delegate. | 61 // Calls OnDisplayModified() on delegate. |
| 62 void ModifyDisplay(int64_t id, const display::ViewportMetrics& metrics); | 62 void ModifyDisplay(int64_t id, const display::ViewportMetrics& metrics); |
| 63 | 63 |
| 64 // Calls OnDisplayRemoved() on delegate. | 64 // Calls OnDisplayRemoved() on delegate. |
| 65 void RemoveDisplay(int64_t id); | 65 void RemoveDisplay(int64_t id); |
| 66 | 66 |
| 67 // display::ScreenManager: | 67 // display::ScreenManager: |
| 68 void AddInterfaces(service_manager::InterfaceRegistry* registry) override {} | 68 void AddInterfaces(service_manager::InterfaceRegistry* registry) override {} |
| 69 void Init(display::ScreenManagerDelegate* delegate) override; | 69 void Init(display::ScreenManagerDelegate* delegate, |
| 70 WindowMode window_mode) override; |
| 70 void RequestCloseDisplay(int64_t display_id) override {} | 71 void RequestCloseDisplay(int64_t display_id) override {} |
| 71 int64_t GetPrimaryDisplayId() const override; | 72 int64_t GetPrimaryDisplayId() const override; |
| 72 | 73 |
| 73 private: | 74 private: |
| 74 display::ScreenManagerDelegate* delegate_; | 75 display::ScreenManagerDelegate* delegate_; |
| 75 int64_t primary_display_id_ = display::kInvalidDisplayId; | 76 int64_t primary_display_id_ = display::kInvalidDisplayId; |
| 76 std::set<int64_t> display_ids_; | 77 std::set<int64_t> display_ids_; |
| 77 | 78 |
| 78 DISALLOW_COPY_AND_ASSIGN(TestScreenManager); | 79 DISALLOW_COPY_AND_ASSIGN(TestScreenManager); |
| 79 }; | 80 }; |
| (...skipping 459 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 539 } | 540 } |
| 540 TestWindowTreeBinding* last_binding() { | 541 TestWindowTreeBinding* last_binding() { |
| 541 return bindings_.empty() ? nullptr : bindings_.back(); | 542 return bindings_.empty() ? nullptr : bindings_.back(); |
| 542 } | 543 } |
| 543 | 544 |
| 544 std::vector<TestWindowTreeBinding*>* bindings() { return &bindings_; } | 545 std::vector<TestWindowTreeBinding*>* bindings() { return &bindings_; } |
| 545 | 546 |
| 546 bool got_on_no_more_displays() const { return got_on_no_more_displays_; } | 547 bool got_on_no_more_displays() const { return got_on_no_more_displays_; } |
| 547 | 548 |
| 548 // WindowServerDelegate: | 549 // WindowServerDelegate: |
| 549 void StartDisplayInit() override; | 550 void StartDisplayInit(bool window_manager_connected) override; |
| 550 void OnNoMoreDisplays() override; | 551 void OnNoMoreDisplays() override; |
| 551 std::unique_ptr<WindowTreeBinding> CreateWindowTreeBinding( | 552 std::unique_ptr<WindowTreeBinding> CreateWindowTreeBinding( |
| 552 BindingType type, | 553 BindingType type, |
| 553 ws::WindowServer* window_server, | 554 ws::WindowServer* window_server, |
| 554 ws::WindowTree* tree, | 555 ws::WindowTree* tree, |
| 555 mojom::WindowTreeRequest* tree_request, | 556 mojom::WindowTreeRequest* tree_request, |
| 556 mojom::WindowTreeClientPtr* client) override; | 557 mojom::WindowTreeClientPtr* client) override; |
| 557 bool IsTestConfig() const override; | 558 bool IsTestConfig() const override; |
| 558 | 559 |
| 559 private: | 560 private: |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 673 ServerWindow* NewWindowInTree(WindowTree* tree, ClientWindowId* client_id); | 674 ServerWindow* NewWindowInTree(WindowTree* tree, ClientWindowId* client_id); |
| 674 ServerWindow* NewWindowInTreeWithParent(WindowTree* tree, | 675 ServerWindow* NewWindowInTreeWithParent(WindowTree* tree, |
| 675 ServerWindow* parent, | 676 ServerWindow* parent, |
| 676 ClientWindowId* client_id); | 677 ClientWindowId* client_id); |
| 677 | 678 |
| 678 } // namespace test | 679 } // namespace test |
| 679 } // namespace ws | 680 } // namespace ws |
| 680 } // namespace ui | 681 } // namespace ui |
| 681 | 682 |
| 682 #endif // SERVICES_UI_WS_TEST_UTILS_H_ | 683 #endif // SERVICES_UI_WS_TEST_UTILS_H_ |
| OLD | NEW |