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

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

Issue 2761233003: Adds ability for accelerators to add key/value pairs to KeyEvent (Closed)
Patch Set: feedback and compile Created 3 years, 9 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/window_server_test_base.h ('k') | services/ui/ws/window_tree.h » ('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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/window_server_test_base.h" 5 #include "services/ui/ws/window_server_test_base.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/location.h" 8 #include "base/location.h"
9 #include "base/memory/ptr_util.h" 9 #include "base/memory/ptr_util.h"
10 #include "base/run_loop.h" 10 #include "base/run_loop.h"
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 } 218 }
219 219
220 void WindowServerTestBase::OnWmDisplayModified( 220 void WindowServerTestBase::OnWmDisplayModified(
221 const display::Display& display) { 221 const display::Display& display) {
222 if (window_manager_delegate_) 222 if (window_manager_delegate_)
223 window_manager_delegate_->OnWmDisplayModified(display); 223 window_manager_delegate_->OnWmDisplayModified(display);
224 } 224 }
225 225
226 ui::mojom::EventResult WindowServerTestBase::OnAccelerator( 226 ui::mojom::EventResult WindowServerTestBase::OnAccelerator(
227 uint32_t accelerator_id, 227 uint32_t accelerator_id,
228 const ui::Event& event) { 228 const ui::Event& event,
229 return window_manager_delegate_ 229 std::unordered_map<std::string, std::vector<uint8_t>>* properties) {
230 ? window_manager_delegate_->OnAccelerator(accelerator_id, event) 230 return window_manager_delegate_ ? window_manager_delegate_->OnAccelerator(
231 : ui::mojom::EventResult::UNHANDLED; 231 accelerator_id, event, properties)
232 : ui::mojom::EventResult::UNHANDLED;
232 } 233 }
233 234
234 void WindowServerTestBase::OnWmPerformMoveLoop( 235 void WindowServerTestBase::OnWmPerformMoveLoop(
235 aura::Window* window, 236 aura::Window* window,
236 ui::mojom::MoveLoopSource source, 237 ui::mojom::MoveLoopSource source,
237 const gfx::Point& cursor_location, 238 const gfx::Point& cursor_location,
238 const base::Callback<void(bool)>& on_done) { 239 const base::Callback<void(bool)>& on_done) {
239 if (window_manager_delegate_) { 240 if (window_manager_delegate_) {
240 window_manager_delegate_->OnWmPerformMoveLoop(window, source, 241 window_manager_delegate_->OnWmPerformMoveLoop(window, source,
241 cursor_location, on_done); 242 cursor_location, on_done);
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
283 ++iter) { 284 ++iter) {
284 if ((*iter).get() == window_tree_host) { 285 if ((*iter).get() == window_tree_host) {
285 window_tree_hosts_.erase(iter); 286 window_tree_hosts_.erase(iter);
286 return true; 287 return true;
287 } 288 }
288 } 289 }
289 return false; 290 return false;
290 } 291 }
291 292
292 } // namespace ui 293 } // namespace ui
OLDNEW
« no previous file with comments | « services/ui/ws/window_server_test_base.h ('k') | services/ui/ws/window_tree.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698