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

Side by Side Diff: components/mus/ws/window_tree_client_unittest.cc

Issue 2019013002: mus: Send display-id to client only for the root windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: doc Created 4 years, 6 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/window_tree.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #include <stddef.h> 5 #include <stddef.h>
6 #include <stdint.h> 6 #include <stdint.h>
7 7
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 if (wait_state_.get() && 269 if (wait_state_.get() &&
270 tracker_.changes()->size() >= wait_state_->change_count) { 270 tracker_.changes()->size() >= wait_state_->change_count) {
271 wait_state_->run_loop.Quit(); 271 wait_state_->run_loop.Quit();
272 } 272 }
273 } 273 }
274 274
275 // WindowTreeClient: 275 // WindowTreeClient:
276 void OnEmbed(ClientSpecificId client_id, 276 void OnEmbed(ClientSpecificId client_id,
277 WindowDataPtr root, 277 WindowDataPtr root,
278 mojom::WindowTreePtr tree, 278 mojom::WindowTreePtr tree,
279 int64_t display_id,
279 Id focused_window_id, 280 Id focused_window_id,
280 bool drawn) override { 281 bool drawn) override {
281 // TODO(sky): add coverage of |focused_window_id|. 282 // TODO(sky): add coverage of |focused_window_id|.
282 ASSERT_TRUE(root); 283 ASSERT_TRUE(root);
283 root_window_id_ = root->window_id; 284 root_window_id_ = root->window_id;
284 tree_ = std::move(tree); 285 tree_ = std::move(tree);
285 client_id_ = client_id; 286 client_id_ = client_id;
286 tracker()->OnEmbed(client_id, std::move(root), drawn); 287 tracker()->OnEmbed(client_id, std::move(root), drawn);
287 if (embed_run_loop_) 288 if (embed_run_loop_)
288 embed_run_loop_->Quit(); 289 embed_run_loop_->Quit();
289 } 290 }
290 void OnEmbeddedAppDisconnected(Id window_id) override { 291 void OnEmbeddedAppDisconnected(Id window_id) override {
291 tracker()->OnEmbeddedAppDisconnected(window_id); 292 tracker()->OnEmbeddedAppDisconnected(window_id);
292 } 293 }
293 void OnUnembed(Id window_id) override { tracker()->OnUnembed(window_id); } 294 void OnUnembed(Id window_id) override { tracker()->OnUnembed(window_id); }
294 void OnLostCapture(Id window_id) override { 295 void OnLostCapture(Id window_id) override {
295 tracker()->OnLostCapture(window_id); 296 tracker()->OnLostCapture(window_id);
296 } 297 }
297 void OnTopLevelCreated(uint32_t change_id, 298 void OnTopLevelCreated(uint32_t change_id,
298 mojom::WindowDataPtr data, 299 mojom::WindowDataPtr data,
300 int64_t display_id,
299 bool drawn) override { 301 bool drawn) override {
300 tracker()->OnTopLevelCreated(change_id, std::move(data), drawn); 302 tracker()->OnTopLevelCreated(change_id, std::move(data), drawn);
301 } 303 }
302 void OnWindowBoundsChanged(Id window_id, 304 void OnWindowBoundsChanged(Id window_id,
303 RectPtr old_bounds, 305 RectPtr old_bounds,
304 RectPtr new_bounds) override { 306 RectPtr new_bounds) override {
305 // The bounds of the root may change during startup on Android at random 307 // The bounds of the root may change during startup on Android at random
306 // times. As this doesn't matter, and shouldn't impact test exepctations, 308 // times. As this doesn't matter, and shouldn't impact test exepctations,
307 // it is ignored. 309 // it is ignored.
308 if (window_id == root_window_id_ && !track_root_bounds_changes_) 310 if (window_id == root_window_id_ && !track_root_bounds_changes_)
(...skipping 1722 matching lines...) Expand 10 before | Expand all | Expand 10 after
2031 2033
2032 // TODO(sky): make sure coverage of what was 2034 // TODO(sky): make sure coverage of what was
2033 // WindowManagerTest.SecondEmbedRoot_InitService and 2035 // WindowManagerTest.SecondEmbedRoot_InitService and
2034 // WindowManagerTest.MultipleEmbedRootsBeforeWTHReady gets added to window 2036 // WindowManagerTest.MultipleEmbedRootsBeforeWTHReady gets added to window
2035 // manager 2037 // manager
2036 // tests. 2038 // tests.
2037 2039
2038 } // namespace test 2040 } // namespace test
2039 } // namespace ws 2041 } // namespace ws
2040 } // namespace mus 2042 } // namespace mus
OLDNEW
« no previous file with comments | « components/mus/ws/window_tree.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698