Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(563)

Side by Side Diff: services/ui/ws/test_utils.h

Issue 2829733002: mus: Changes SetDisplayRoot() to create actual display (Closed)
Patch Set: unnecessary get Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « services/ui/ws/display_manager.cc ('k') | services/ui/ws/test_utils.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 // Calls OnDisplayModified() on delegate. 61 // Calls OnDisplayModified() on delegate.
62 void ModifyDisplay(const display::Display& display); 62 void ModifyDisplay(const display::Display& display);
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::BinderRegistry* registry) override {} 68 void AddInterfaces(service_manager::BinderRegistry* registry) override {}
69 void Init(display::ScreenManagerDelegate* delegate) override; 69 void Init(display::ScreenManagerDelegate* delegate) override;
70 void RequestCloseDisplay(int64_t display_id) override {} 70 void RequestCloseDisplay(int64_t display_id) override {}
71 display::ScreenBase* GetScreen() override;
71 72
72 private: 73 private:
73 display::ScreenManagerDelegate* delegate_ = nullptr; 74 display::ScreenManagerDelegate* delegate_ = nullptr;
74 std::unique_ptr<display::ScreenBase> screen_; 75 std::unique_ptr<display::ScreenBase> screen_;
75 std::set<int64_t> display_ids_; 76 std::set<int64_t> display_ids_;
76 77
77 DISALLOW_COPY_AND_ASSIGN(TestScreenManager); 78 DISALLOW_COPY_AND_ASSIGN(TestScreenManager);
78 }; 79 };
79 80
80 // ----------------------------------------------------------------------------- 81 // -----------------------------------------------------------------------------
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 void AckLastAccelerator( 121 void AckLastAccelerator(
121 mojom::EventResult result, 122 mojom::EventResult result,
122 const std::unordered_map<std::string, std::vector<uint8_t>>& properties = 123 const std::unordered_map<std::string, std::vector<uint8_t>>& properties =
123 std::unordered_map<std::string, std::vector<uint8_t>>()) { 124 std::unordered_map<std::string, std::vector<uint8_t>>()) {
124 tree_->OnAcceleratorAck(tree_->event_ack_id_, result, properties); 125 tree_->OnAcceleratorAck(tree_->event_ack_id_, result, properties);
125 } 126 }
126 127
127 void StartPointerWatcher(bool want_moves); 128 void StartPointerWatcher(bool want_moves);
128 void StopPointerWatcher(); 129 void StopPointerWatcher();
129 130
130 bool ProcessSetDisplayRoot(int64_t display_id, 131 bool ProcessSetDisplayRoot(const display::Display& display_to_create,
132 const mojom::WmViewportMetrics& viewport_metrics,
133 bool is_primary_display,
131 const ClientWindowId& client_window_id) { 134 const ClientWindowId& client_window_id) {
132 return tree_->ProcessSetDisplayRoot(display_id, client_window_id); 135 return tree_->ProcessSetDisplayRoot(display_to_create, viewport_metrics,
136 is_primary_display, client_window_id);
133 } 137 }
134 138
135 private: 139 private:
136 WindowTree* tree_; 140 WindowTree* tree_;
137 141
138 DISALLOW_COPY_AND_ASSIGN(WindowTreeTestApi); 142 DISALLOW_COPY_AND_ASSIGN(WindowTreeTestApi);
139 }; 143 };
140 144
141 // ----------------------------------------------------------------------------- 145 // -----------------------------------------------------------------------------
142 146
(...skipping 571 matching lines...) Expand 10 before | Expand all | Expand 10 after
714 ClientWindowId* client_id = nullptr); 718 ClientWindowId* client_id = nullptr);
715 ServerWindow* NewWindowInTreeWithParent(WindowTree* tree, 719 ServerWindow* NewWindowInTreeWithParent(WindowTree* tree,
716 ServerWindow* parent, 720 ServerWindow* parent,
717 ClientWindowId* client_id = nullptr); 721 ClientWindowId* client_id = nullptr);
718 722
719 } // namespace test 723 } // namespace test
720 } // namespace ws 724 } // namespace ws
721 } // namespace ui 725 } // namespace ui
722 726
723 #endif // SERVICES_UI_WS_TEST_UTILS_H_ 727 #endif // SERVICES_UI_WS_TEST_UTILS_H_
OLDNEW
« no previous file with comments | « services/ui/ws/display_manager.cc ('k') | services/ui/ws/test_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698