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

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: merge 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
« no previous file with comments | « services/ui/ws/test_utils.h ('k') | services/ui/ws/window_manager_client_unittest.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 "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 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 185
186 void TestWindowManager::WmPerformMoveLoop(uint32_t change_id, 186 void TestWindowManager::WmPerformMoveLoop(uint32_t change_id,
187 uint32_t window_id, 187 uint32_t window_id,
188 mojom::MoveLoopSource source, 188 mojom::MoveLoopSource source,
189 const gfx::Point& cursor_location) { 189 const gfx::Point& cursor_location) {
190 on_perform_move_loop_called_ = true; 190 on_perform_move_loop_called_ = true;
191 } 191 }
192 192
193 void TestWindowManager::WmCancelMoveLoop(uint32_t window_id) {} 193 void TestWindowManager::WmCancelMoveLoop(uint32_t window_id) {}
194 194
195 void TestWindowManager::OnAccelerator(uint32_t id, 195 void TestWindowManager::OnAccelerator(uint32_t ack_id,
196 uint32_t accelerator_id,
196 std::unique_ptr<ui::Event> event) { 197 std::unique_ptr<ui::Event> event) {
197 on_accelerator_called_ = true; 198 on_accelerator_called_ = true;
198 on_accelerator_id_ = id; 199 on_accelerator_id_ = accelerator_id;
199 } 200 }
200 201
201 // TestWindowTreeClient ------------------------------------------------------- 202 // TestWindowTreeClient -------------------------------------------------------
202 203
203 TestWindowTreeClient::TestWindowTreeClient() 204 TestWindowTreeClient::TestWindowTreeClient()
204 : binding_(this), record_on_change_completed_(false) {} 205 : binding_(this), record_on_change_completed_(false) {}
205 TestWindowTreeClient::~TestWindowTreeClient() {} 206 TestWindowTreeClient::~TestWindowTreeClient() {}
206 207
207 void TestWindowTreeClient::Bind( 208 void TestWindowTreeClient::Bind(
208 mojo::InterfaceRequest<mojom::WindowTreeClient> request) { 209 mojo::InterfaceRequest<mojom::WindowTreeClient> request) {
(...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after
513 return nullptr; 514 return nullptr;
514 if (!tree->AddWindow(parent_client_id, client_window_id)) 515 if (!tree->AddWindow(parent_client_id, client_window_id))
515 return nullptr; 516 return nullptr;
516 *client_id = client_window_id; 517 *client_id = client_window_id;
517 return tree->GetWindowByClientId(client_window_id); 518 return tree->GetWindowByClientId(client_window_id);
518 } 519 }
519 520
520 } // namespace test 521 } // namespace test
521 } // namespace ws 522 } // namespace ws
522 } // namespace ui 523 } // namespace ui
OLDNEW
« no previous file with comments | « services/ui/ws/test_utils.h ('k') | services/ui/ws/window_manager_client_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698