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

Side by Side Diff: components/mus/ws/test_utils.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/test_utils.h ('k') | components/mus/ws/window_tree.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 #include "components/mus/ws/test_utils.h" 5 #include "components/mus/ws/test_utils.h"
6 6
7 #include "base/memory/ptr_util.h" 7 #include "base/memory/ptr_util.h"
8 #include "cc/output/copy_output_request.h" 8 #include "cc/output/copy_output_request.h"
9 #include "components/mus/surfaces/surfaces_state.h" 9 #include "components/mus/surfaces/surfaces_state.h"
10 #include "components/mus/ws/display_binding.h" 10 #include "components/mus/ws/display_binding.h"
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 TestWindowTreeClient::~TestWindowTreeClient() {} 175 TestWindowTreeClient::~TestWindowTreeClient() {}
176 176
177 void TestWindowTreeClient::Bind( 177 void TestWindowTreeClient::Bind(
178 mojo::InterfaceRequest<mojom::WindowTreeClient> request) { 178 mojo::InterfaceRequest<mojom::WindowTreeClient> request) {
179 binding_.Bind(std::move(request)); 179 binding_.Bind(std::move(request));
180 } 180 }
181 181
182 void TestWindowTreeClient::OnEmbed(uint16_t client_id, 182 void TestWindowTreeClient::OnEmbed(uint16_t client_id,
183 mojom::WindowDataPtr root, 183 mojom::WindowDataPtr root,
184 mus::mojom::WindowTreePtr tree, 184 mus::mojom::WindowTreePtr tree,
185 int64_t display_id,
185 Id focused_window_id, 186 Id focused_window_id,
186 bool drawn) { 187 bool drawn) {
187 // TODO(sky): add test coverage of |focused_window_id|. 188 // TODO(sky): add test coverage of |focused_window_id|.
188 tracker_.OnEmbed(client_id, std::move(root), drawn); 189 tracker_.OnEmbed(client_id, std::move(root), drawn);
189 } 190 }
190 191
191 void TestWindowTreeClient::OnEmbeddedAppDisconnected(uint32_t window) { 192 void TestWindowTreeClient::OnEmbeddedAppDisconnected(uint32_t window) {
192 tracker_.OnEmbeddedAppDisconnected(window); 193 tracker_.OnEmbeddedAppDisconnected(window);
193 } 194 }
194 195
195 void TestWindowTreeClient::OnUnembed(Id window_id) { 196 void TestWindowTreeClient::OnUnembed(Id window_id) {
196 tracker_.OnUnembed(window_id); 197 tracker_.OnUnembed(window_id);
197 } 198 }
198 199
199 void TestWindowTreeClient::OnLostCapture(Id window_id) {} 200 void TestWindowTreeClient::OnLostCapture(Id window_id) {}
200 201
201 void TestWindowTreeClient::OnTopLevelCreated(uint32_t change_id, 202 void TestWindowTreeClient::OnTopLevelCreated(uint32_t change_id,
202 mojom::WindowDataPtr data, 203 mojom::WindowDataPtr data,
204 int64_t display_id,
203 bool drawn) { 205 bool drawn) {
204 tracker_.OnTopLevelCreated(change_id, std::move(data), drawn); 206 tracker_.OnTopLevelCreated(change_id, std::move(data), drawn);
205 } 207 }
206 208
207 void TestWindowTreeClient::OnWindowBoundsChanged(uint32_t window, 209 void TestWindowTreeClient::OnWindowBoundsChanged(uint32_t window,
208 mojo::RectPtr old_bounds, 210 mojo::RectPtr old_bounds,
209 mojo::RectPtr new_bounds) { 211 mojo::RectPtr new_bounds) {
210 tracker_.OnWindowBoundsChanged(window, std::move(old_bounds), 212 tracker_.OnWindowBoundsChanged(window, std::move(old_bounds),
211 std::move(new_bounds)); 213 std::move(new_bounds));
212 } 214 }
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after
485 return nullptr; 487 return nullptr;
486 if (!tree->AddWindow(parent_client_id, client_window_id)) 488 if (!tree->AddWindow(parent_client_id, client_window_id))
487 return nullptr; 489 return nullptr;
488 *client_id = client_window_id; 490 *client_id = client_window_id;
489 return tree->GetWindowByClientId(client_window_id); 491 return tree->GetWindowByClientId(client_window_id);
490 } 492 }
491 493
492 } // namespace test 494 } // namespace test
493 } // namespace ws 495 } // namespace ws
494 } // namespace mus 496 } // namespace mus
OLDNEW
« no previous file with comments | « components/mus/ws/test_utils.h ('k') | components/mus/ws/window_tree.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698