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::PlatformScreen: | 67 // display::PlatformScreen: |
68 void AddInterfaces(service_manager::InterfaceRegistry* registry) override {} | 68 void AddInterfaces(service_manager::InterfaceRegistry* registry) override {} |
69 void Init(display::PlatformScreenDelegate* delegate) override; | 69 void Init(display::PlatformScreenDelegate* 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::PlatformScreenDelegate* delegate_; | 75 display::PlatformScreenDelegate* 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(TestPlatformScreen); | 79 DISALLOW_COPY_AND_ASSIGN(TestPlatformScreen); |
79 }; | 80 }; |
(...skipping 457 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
537 } | 538 } |
538 TestWindowTreeBinding* last_binding() { | 539 TestWindowTreeBinding* last_binding() { |
539 return bindings_.empty() ? nullptr : bindings_.back(); | 540 return bindings_.empty() ? nullptr : bindings_.back(); |
540 } | 541 } |
541 | 542 |
542 std::vector<TestWindowTreeBinding*>* bindings() { return &bindings_; } | 543 std::vector<TestWindowTreeBinding*>* bindings() { return &bindings_; } |
543 | 544 |
544 bool got_on_no_more_displays() const { return got_on_no_more_displays_; } | 545 bool got_on_no_more_displays() const { return got_on_no_more_displays_; } |
545 | 546 |
546 // WindowServerDelegate: | 547 // WindowServerDelegate: |
547 void StartDisplayInit() override; | 548 void StartDisplayInit(bool window_manager_connected) override; |
548 void OnNoMoreDisplays() override; | 549 void OnNoMoreDisplays() override; |
549 std::unique_ptr<WindowTreeBinding> CreateWindowTreeBinding( | 550 std::unique_ptr<WindowTreeBinding> CreateWindowTreeBinding( |
550 BindingType type, | 551 BindingType type, |
551 ws::WindowServer* window_server, | 552 ws::WindowServer* window_server, |
552 ws::WindowTree* tree, | 553 ws::WindowTree* tree, |
553 mojom::WindowTreeRequest* tree_request, | 554 mojom::WindowTreeRequest* tree_request, |
554 mojom::WindowTreeClientPtr* client) override; | 555 mojom::WindowTreeClientPtr* client) override; |
555 bool IsTestConfig() const override; | 556 bool IsTestConfig() const override; |
556 void UpdateTouchTransforms() override {} | 557 void UpdateTouchTransforms() override {} |
557 | 558 |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
672 ServerWindow* NewWindowInTree(WindowTree* tree, ClientWindowId* client_id); | 673 ServerWindow* NewWindowInTree(WindowTree* tree, ClientWindowId* client_id); |
673 ServerWindow* NewWindowInTreeWithParent(WindowTree* tree, | 674 ServerWindow* NewWindowInTreeWithParent(WindowTree* tree, |
674 ServerWindow* parent, | 675 ServerWindow* parent, |
675 ClientWindowId* client_id); | 676 ClientWindowId* client_id); |
676 | 677 |
677 } // namespace test | 678 } // namespace test |
678 } // namespace ws | 679 } // namespace ws |
679 } // namespace ui | 680 } // namespace ui |
680 | 681 |
681 #endif // SERVICES_UI_WS_TEST_UTILS_H_ | 682 #endif // SERVICES_UI_WS_TEST_UTILS_H_ |
OLD | NEW |