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

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

Issue 2060513002: Tab dragging as implemented as a mus API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use not not pattern to fix win compile Created 4 years, 5 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
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 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 uint32_t change_id, 158 uint32_t change_id,
159 ClientSpecificId requesting_client_id, 159 ClientSpecificId requesting_client_id,
160 mojo::Map<mojo::String, mojo::Array<uint8_t>> properties) { 160 mojo::Map<mojo::String, mojo::Array<uint8_t>> properties) {
161 got_create_top_level_window_ = true; 161 got_create_top_level_window_ = true;
162 change_id_ = change_id; 162 change_id_ = change_id;
163 } 163 }
164 164
165 void TestWindowManager::WmClientJankinessChanged(ClientSpecificId client_id, 165 void TestWindowManager::WmClientJankinessChanged(ClientSpecificId client_id,
166 bool janky) {} 166 bool janky) {}
167 167
168 void TestWindowManager::WmPerformMoveLoop(uint32_t change_id,
169 uint32_t window_id,
170 const gfx::Point& cursor_location) {
171 on_perform_move_loop_called_ = true;
172 }
173
174 void TestWindowManager::WmCancelMoveLoop(uint32_t window_id) {}
175
168 void TestWindowManager::OnAccelerator(uint32_t id, 176 void TestWindowManager::OnAccelerator(uint32_t id,
169 std::unique_ptr<ui::Event> event) { 177 std::unique_ptr<ui::Event> event) {
170 on_accelerator_called_ = true; 178 on_accelerator_called_ = true;
171 on_accelerator_id_ = id; 179 on_accelerator_id_ = id;
172 } 180 }
173 181
174 // TestWindowTreeClient ------------------------------------------------------- 182 // TestWindowTreeClient -------------------------------------------------------
175 183
176 TestWindowTreeClient::TestWindowTreeClient() 184 TestWindowTreeClient::TestWindowTreeClient()
177 : binding_(this), record_on_change_completed_(false) {} 185 : binding_(this), record_on_change_completed_(false) {}
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 uint32_t window_id, 299 uint32_t window_id,
292 mojom::Cursor cursor_id) { 300 mojom::Cursor cursor_id) {
293 tracker_.OnWindowPredefinedCursorChanged(window_id, cursor_id); 301 tracker_.OnWindowPredefinedCursorChanged(window_id, cursor_id);
294 } 302 }
295 303
296 void TestWindowTreeClient::OnChangeCompleted(uint32_t change_id, bool success) { 304 void TestWindowTreeClient::OnChangeCompleted(uint32_t change_id, bool success) {
297 if (record_on_change_completed_) 305 if (record_on_change_completed_)
298 tracker_.OnChangeCompleted(change_id, success); 306 tracker_.OnChangeCompleted(change_id, success);
299 } 307 }
300 308
309 void TestWindowTreeClient::OnMoveLoopCompleted(uint32_t change_id,
310 bool success) {
311 if (record_on_change_completed_)
312 tracker_.OnChangeCompleted(change_id, success);
313 }
314
301 void TestWindowTreeClient::RequestClose(uint32_t window_id) {} 315 void TestWindowTreeClient::RequestClose(uint32_t window_id) {}
302 316
303 void TestWindowTreeClient::GetWindowManager( 317 void TestWindowTreeClient::GetWindowManager(
304 mojo::AssociatedInterfaceRequest<mojom::WindowManager> internal) {} 318 mojo::AssociatedInterfaceRequest<mojom::WindowManager> internal) {}
305 319
306 // TestWindowTreeBinding ------------------------------------------------------ 320 // TestWindowTreeBinding ------------------------------------------------------
307 321
308 TestWindowTreeBinding::TestWindowTreeBinding(WindowTree* tree) 322 TestWindowTreeBinding::TestWindowTreeBinding(WindowTree* tree)
309 : WindowTreeBinding(&client_), tree_(tree) {} 323 : WindowTreeBinding(&client_), tree_(tree) {}
310 TestWindowTreeBinding::~TestWindowTreeBinding() {} 324 TestWindowTreeBinding::~TestWindowTreeBinding() {}
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
485 return nullptr; 499 return nullptr;
486 if (!tree->AddWindow(parent_client_id, client_window_id)) 500 if (!tree->AddWindow(parent_client_id, client_window_id))
487 return nullptr; 501 return nullptr;
488 *client_id = client_window_id; 502 *client_id = client_window_id;
489 return tree->GetWindowByClientId(client_window_id); 503 return tree->GetWindowByClientId(client_window_id);
490 } 504 }
491 505
492 } // namespace test 506 } // namespace test
493 } // namespace ws 507 } // namespace ws
494 } // namespace mus 508 } // namespace mus
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698