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

Side by Side Diff: components/mus/ws/test_utils.h

Issue 1766943002: Refators display related functionality into own class (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge Created 4 years, 9 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 | « components/mus/ws/test_server_window_delegate.cc ('k') | components/mus/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 COMPONENTS_MUS_WS_TEST_UTILS_H_ 5 #ifndef COMPONENTS_MUS_WS_TEST_UTILS_H_
6 #define COMPONENTS_MUS_WS_TEST_UTILS_H_ 6 #define COMPONENTS_MUS_WS_TEST_UTILS_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "components/mus/public/interfaces/window_tree.mojom.h" 10 #include "components/mus/public/interfaces/window_tree.mojom.h"
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 204
205 void set_num_displays_to_create(int count) { 205 void set_num_displays_to_create(int count) {
206 num_displays_to_create_ = count; 206 num_displays_to_create_ = count;
207 } 207 }
208 208
209 TestWindowTreeClient* last_client() { 209 TestWindowTreeClient* last_client() {
210 return last_binding_ ? last_binding_->client() : nullptr; 210 return last_binding_ ? last_binding_->client() : nullptr;
211 } 211 }
212 TestWindowTreeBinding* last_binding() { return last_binding_; } 212 TestWindowTreeBinding* last_binding() { return last_binding_; }
213 213
214 bool got_on_no_more_connections() const { 214 bool got_on_no_more_displays() const { return got_on_no_more_displays_; }
215 return got_on_no_more_connections_;
216 }
217 215
218 // ConnectionManagerDelegate: 216 // ConnectionManagerDelegate:
219 void OnNoMoreRootConnections() override; 217 void OnNoMoreDisplays() override;
220 scoped_ptr<WindowTreeBinding> CreateWindowTreeBindingForEmbedAtWindow( 218 scoped_ptr<WindowTreeBinding> CreateWindowTreeBindingForEmbedAtWindow(
221 ws::ConnectionManager* connection_manager, 219 ws::ConnectionManager* connection_manager,
222 ws::WindowTree* tree, 220 ws::WindowTree* tree,
223 mojom::WindowTreeRequest tree_request, 221 mojom::WindowTreeRequest tree_request,
224 mojom::WindowTreeClientPtr client) override; 222 mojom::WindowTreeClientPtr client) override;
225 void CreateDefaultDisplays() override; 223 void CreateDefaultDisplays() override;
226 224
227 private: 225 private:
228 // If CreateDefaultDisplays() this is the number of Displays that are 226 // If CreateDefaultDisplays() this is the number of Displays that are
229 // created. The default is 0, which results in a DCHECK. 227 // created. The default is 0, which results in a DCHECK.
230 int num_displays_to_create_ = 0; 228 int num_displays_to_create_ = 0;
231 TestWindowTreeBinding* last_binding_ = nullptr; 229 TestWindowTreeBinding* last_binding_ = nullptr;
232 Display* display_ = nullptr; 230 Display* display_ = nullptr;
233 ConnectionManager* connection_manager_ = nullptr; 231 ConnectionManager* connection_manager_ = nullptr;
234 bool got_on_no_more_connections_ = false; 232 bool got_on_no_more_displays_ = false;
235 233
236 DISALLOW_COPY_AND_ASSIGN(TestConnectionManagerDelegate); 234 DISALLOW_COPY_AND_ASSIGN(TestConnectionManagerDelegate);
237 }; 235 };
238 236
239 } // namespace test 237 } // namespace test
240 } // namespace ws 238 } // namespace ws
241 } // namespace mus 239 } // namespace mus
242 240
243 #endif // COMPONENTS_MUS_WS_TEST_UTILS_H_ 241 #endif // COMPONENTS_MUS_WS_TEST_UTILS_H_
OLDNEW
« no previous file with comments | « components/mus/ws/test_server_window_delegate.cc ('k') | components/mus/ws/test_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698