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

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

Issue 2125883003: Adds ability for pre-target accelerators to not consume events (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comments 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 "services/ui/ws/test_utils.h" 5 #include "services/ui/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 "services/shell/public/interfaces/connector.mojom.h" 9 #include "services/shell/public/interfaces/connector.mojom.h"
10 #include "services/ui/surfaces/surfaces_state.h" 10 #include "services/ui/surfaces/surfaces_state.h"
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 169
170 void TestWindowManager::WmPerformMoveLoop(uint32_t change_id, 170 void TestWindowManager::WmPerformMoveLoop(uint32_t change_id,
171 uint32_t window_id, 171 uint32_t window_id,
172 mojom::MoveLoopSource source, 172 mojom::MoveLoopSource source,
173 const gfx::Point& cursor_location) { 173 const gfx::Point& cursor_location) {
174 on_perform_move_loop_called_ = true; 174 on_perform_move_loop_called_ = true;
175 } 175 }
176 176
177 void TestWindowManager::WmCancelMoveLoop(uint32_t window_id) {} 177 void TestWindowManager::WmCancelMoveLoop(uint32_t window_id) {}
178 178
179 void TestWindowManager::OnAccelerator(uint32_t id, 179 void TestWindowManager::OnAccelerator(uint32_t ack_id,
180 uint32_t accelerator_id,
180 std::unique_ptr<ui::Event> event) { 181 std::unique_ptr<ui::Event> event) {
181 on_accelerator_called_ = true; 182 on_accelerator_called_ = true;
182 on_accelerator_id_ = id; 183 on_accelerator_id_ = accelerator_id;
183 } 184 }
184 185
185 // TestWindowTreeClient ------------------------------------------------------- 186 // TestWindowTreeClient -------------------------------------------------------
186 187
187 TestWindowTreeClient::TestWindowTreeClient() 188 TestWindowTreeClient::TestWindowTreeClient()
188 : binding_(this), record_on_change_completed_(false) {} 189 : binding_(this), record_on_change_completed_(false) {}
189 TestWindowTreeClient::~TestWindowTreeClient() {} 190 TestWindowTreeClient::~TestWindowTreeClient() {}
190 191
191 void TestWindowTreeClient::Bind( 192 void TestWindowTreeClient::Bind(
192 mojo::InterfaceRequest<mojom::WindowTreeClient> request) { 193 mojo::InterfaceRequest<mojom::WindowTreeClient> request) {
(...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after
497 return nullptr; 498 return nullptr;
498 if (!tree->AddWindow(parent_client_id, client_window_id)) 499 if (!tree->AddWindow(parent_client_id, client_window_id))
499 return nullptr; 500 return nullptr;
500 *client_id = client_window_id; 501 *client_id = client_window_id;
501 return tree->GetWindowByClientId(client_window_id); 502 return tree->GetWindowByClientId(client_window_id);
502 } 503 }
503 504
504 } // namespace test 505 } // namespace test
505 } // namespace ws 506 } // namespace ws
506 } // namespace ui 507 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698