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

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

Issue 2197203003: Rebind mus keyboard shortcut for dump ServerWindow hierarchy to Ctrl-Alt-Shift-M (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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 | « ash/common/accelerators/accelerator_table.cc ('k') | no next file » | 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/window_manager_state.h" 5 #include "services/ui/ws/window_manager_state.h"
6 6
7 #include "base/memory/weak_ptr.h" 7 #include "base/memory/weak_ptr.h"
8 #include "services/shell/public/interfaces/connector.mojom.h" 8 #include "services/shell/public/interfaces/connector.mojom.h"
9 #include "services/ui/common/event_matcher_util.h" 9 #include "services/ui/common/event_matcher_util.h"
10 #include "services/ui/ws/accelerator.h" 10 #include "services/ui/ws/accelerator.h"
(...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after
360 // Ignore |tree| because it will receive the event via normal dispatch. 360 // Ignore |tree| because it will receive the event via normal dispatch.
361 window_server()->SendToEventObservers(event, user_id(), tree); 361 window_server()->SendToEventObservers(event, user_id(), tree);
362 362
363 tree->DispatchInputEvent(target, event); 363 tree->DispatchInputEvent(target, event);
364 } 364 }
365 365
366 void WindowManagerState::AddDebugAccelerators() { 366 void WindowManagerState::AddDebugAccelerators() {
367 // Always register the accelerators, even if they only work in debug, so that 367 // Always register the accelerators, even if they only work in debug, so that
368 // keyboard behavior is the same in release and debug builds. 368 // keyboard behavior is the same in release and debug builds.
369 mojom::EventMatcherPtr matcher = CreateKeyMatcher( 369 mojom::EventMatcherPtr matcher = CreateKeyMatcher(
370 ui::mojom::KeyboardCode::S, ui::mojom::kEventFlagControlDown | 370 ui::mojom::KeyboardCode::M, ui::mojom::kEventFlagControlDown |
sky 2016/08/01 20:43:20 I think the wm should be able to override debug ac
371 ui::mojom::kEventFlagAltDown | 371 ui::mojom::kEventFlagAltDown |
372 ui::mojom::kEventFlagShiftDown); 372 ui::mojom::kEventFlagShiftDown);
373 event_dispatcher_.AddAccelerator(kPrintWindowsDebugAcceleratorId, 373 event_dispatcher_.AddAccelerator(kPrintWindowsDebugAcceleratorId,
374 std::move(matcher)); 374 std::move(matcher));
375 } 375 }
376 376
377 bool WindowManagerState::HandleDebugAccelerator(uint32_t accelerator_id) { 377 bool WindowManagerState::HandleDebugAccelerator(uint32_t accelerator_id) {
378 #if !defined(NDEBUG) 378 #if !defined(NDEBUG)
379 if (accelerator_id == kPrintWindowsDebugAcceleratorId) { 379 if (accelerator_id == kPrintWindowsDebugAcceleratorId) {
380 // Error so it will be collected in system logs. 380 // Error so it will be collected in system logs.
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
529 return display_root ? display_root->root() : nullptr; 529 return display_root ? display_root->root() : nullptr;
530 } 530 }
531 531
532 void WindowManagerState::OnEventTargetNotFound(const ui::Event& event) { 532 void WindowManagerState::OnEventTargetNotFound(const ui::Event& event) {
533 window_server()->SendToEventObservers(event, user_id(), 533 window_server()->SendToEventObservers(event, user_id(),
534 nullptr /* ignore_tree */); 534 nullptr /* ignore_tree */);
535 } 535 }
536 536
537 } // namespace ws 537 } // namespace ws
538 } // namespace ui 538 } // namespace ui
OLDNEW
« no previous file with comments | « ash/common/accelerators/accelerator_table.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698