| 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 16 matching lines...) Expand all Loading... |
| 27 #include "services/ui/ws/test_change_tracker.h" | 27 #include "services/ui/ws/test_change_tracker.h" |
| 28 #include "services/ui/ws/user_activity_monitor.h" | 28 #include "services/ui/ws/user_activity_monitor.h" |
| 29 #include "services/ui/ws/user_display_manager.h" | 29 #include "services/ui/ws/user_display_manager.h" |
| 30 #include "services/ui/ws/user_id.h" | 30 #include "services/ui/ws/user_id.h" |
| 31 #include "services/ui/ws/window_manager_state.h" | 31 #include "services/ui/ws/window_manager_state.h" |
| 32 #include "services/ui/ws/window_manager_window_tree_factory_set.h" | 32 #include "services/ui/ws/window_manager_window_tree_factory_set.h" |
| 33 #include "services/ui/ws/window_server_delegate.h" | 33 #include "services/ui/ws/window_server_delegate.h" |
| 34 #include "services/ui/ws/window_tree.h" | 34 #include "services/ui/ws/window_tree.h" |
| 35 #include "services/ui/ws/window_tree_binding.h" | 35 #include "services/ui/ws/window_tree_binding.h" |
| 36 #include "ui/display/display.h" | 36 #include "ui/display/display.h" |
| 37 #include "ui/display/types/display_constants.h" |
| 37 | 38 |
| 38 namespace ui { | 39 namespace ui { |
| 39 namespace ws { | 40 namespace ws { |
| 40 namespace test { | 41 namespace test { |
| 41 | 42 |
| 42 // Collection of utilities useful in creating mus tests. | 43 // Collection of utilities useful in creating mus tests. |
| 43 | 44 |
| 44 // Test PlatformDisplay instance that allows adding/modifying/removing displays. | 45 // Test PlatformDisplay instance that allows adding/modifying/removing displays. |
| 45 // Tracks display ids to perform some basic verification that no duplicates are | 46 // Tracks display ids to perform some basic verification that no duplicates are |
| 46 // added and display was added before being modified or removed. Display ids | 47 // added and display was added before being modified or removed. Display ids |
| (...skipping 18 matching lines...) Expand all Loading... |
| 65 void RemoveDisplay(int64_t id); | 66 void RemoveDisplay(int64_t id); |
| 66 | 67 |
| 67 // display::PlatformScreen: | 68 // display::PlatformScreen: |
| 68 void AddInterfaces(service_manager::InterfaceRegistry* registry) override {} | 69 void AddInterfaces(service_manager::InterfaceRegistry* registry) override {} |
| 69 void Init(display::PlatformScreenDelegate* delegate) override; | 70 void Init(display::PlatformScreenDelegate* delegate) 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::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 }; |
| 80 | 81 |
| 81 // ----------------------------------------------------------------------------- | 82 // ----------------------------------------------------------------------------- |
| 82 | 83 |
| 83 class UserDisplayManagerTestApi { | 84 class UserDisplayManagerTestApi { |
| 84 public: | 85 public: |
| 85 explicit UserDisplayManagerTestApi(UserDisplayManager* udm) : udm_(udm) {} | 86 explicit UserDisplayManagerTestApi(UserDisplayManager* udm) : udm_(udm) {} |
| (...skipping 607 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 |