| 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 = WINDOW_MODE_INTERNAL) 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::Display::kInvalidDisplayID; | 76 int64_t primary_display_id_ = display::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 476 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 556 } | 557 } |
| 557 TestWindowTreeBinding* last_binding() { | 558 TestWindowTreeBinding* last_binding() { |
| 558 return bindings_.empty() ? nullptr : bindings_.back(); | 559 return bindings_.empty() ? nullptr : bindings_.back(); |
| 559 } | 560 } |
| 560 | 561 |
| 561 std::vector<TestWindowTreeBinding*>* bindings() { return &bindings_; } | 562 std::vector<TestWindowTreeBinding*>* bindings() { return &bindings_; } |
| 562 | 563 |
| 563 bool got_on_no_more_displays() const { return got_on_no_more_displays_; } | 564 bool got_on_no_more_displays() const { return got_on_no_more_displays_; } |
| 564 | 565 |
| 565 // WindowServerDelegate: | 566 // WindowServerDelegate: |
| 566 void StartDisplayInit() override; | 567 void StartDisplayInit(bool window_manager_connected) override; |
| 567 void OnNoMoreDisplays() override; | 568 void OnNoMoreDisplays() override; |
| 568 std::unique_ptr<WindowTreeBinding> CreateWindowTreeBinding( | 569 std::unique_ptr<WindowTreeBinding> CreateWindowTreeBinding( |
| 569 BindingType type, | 570 BindingType type, |
| 570 ws::WindowServer* window_server, | 571 ws::WindowServer* window_server, |
| 571 ws::WindowTree* tree, | 572 ws::WindowTree* tree, |
| 572 mojom::WindowTreeRequest* tree_request, | 573 mojom::WindowTreeRequest* tree_request, |
| 573 mojom::WindowTreeClientPtr* client) override; | 574 mojom::WindowTreeClientPtr* client) override; |
| 574 bool IsTestConfig() const override; | 575 bool IsTestConfig() const override; |
| 575 void UpdateTouchTransforms() override {} | 576 void UpdateTouchTransforms() override {} |
| 576 | 577 |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 693 ServerWindow* NewWindowInTree(WindowTree* tree, ClientWindowId* client_id); | 694 ServerWindow* NewWindowInTree(WindowTree* tree, ClientWindowId* client_id); |
| 694 ServerWindow* NewWindowInTreeWithParent(WindowTree* tree, | 695 ServerWindow* NewWindowInTreeWithParent(WindowTree* tree, |
| 695 ServerWindow* parent, | 696 ServerWindow* parent, |
| 696 ClientWindowId* client_id); | 697 ClientWindowId* client_id); |
| 697 | 698 |
| 698 } // namespace test | 699 } // namespace test |
| 699 } // namespace ws | 700 } // namespace ws |
| 700 } // namespace ui | 701 } // namespace ui |
| 701 | 702 |
| 702 #endif // SERVICES_UI_WS_TEST_UTILS_H_ | 703 #endif // SERVICES_UI_WS_TEST_UTILS_H_ |
| OLD | NEW |