Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/memory/weak_ptr.h" | 9 #include "base/memory/weak_ptr.h" |
| 10 #include "services/service_manager/public/interfaces/connector.mojom.h" | 10 #include "services/service_manager/public/interfaces/connector.mojom.h" |
| (...skipping 418 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 429 post_target_accelerator_ = accelerator; | 429 post_target_accelerator_ = accelerator; |
| 430 | 430 |
| 431 // Ignore |tree| because it will receive the event via normal dispatch. | 431 // Ignore |tree| because it will receive the event via normal dispatch. |
| 432 window_server()->SendToPointerWatchers(event, user_id(), target, tree); | 432 window_server()->SendToPointerWatchers(event, user_id(), target, tree); |
| 433 | 433 |
| 434 tree->DispatchInputEvent(target, event); | 434 tree->DispatchInputEvent(target, event); |
| 435 } | 435 } |
| 436 | 436 |
| 437 void WindowManagerState::AddDebugAccelerators() { | 437 void WindowManagerState::AddDebugAccelerators() { |
| 438 const DebugAccelerator accelerator = { | 438 const DebugAccelerator accelerator = { |
| 439 DebugAcceleratorType::PRINT_WINDOWS, ui::VKEY_S, | 439 DebugAcceleratorType::PRINT_WINDOWS, ui::VKEY_B, |
|
sky
2016/10/28 17:08:47
Is there a reason you're changing this?
kylechar
2016/10/28 19:40:37
There is an existing ash shortcut that's mapped to
sky
2016/10/28 19:59:36
I tend to think we should make it the same as that
| |
| 440 ui::EF_CONTROL_DOWN | ui::EF_ALT_DOWN | ui::EF_SHIFT_DOWN}; | 440 ui::EF_CONTROL_DOWN | ui::EF_ALT_DOWN | ui::EF_SHIFT_DOWN}; |
| 441 debug_accelerators_.push_back(accelerator); | 441 debug_accelerators_.push_back(accelerator); |
| 442 } | 442 } |
| 443 | 443 |
| 444 void WindowManagerState::ProcessDebugAccelerator(const ui::Event& event) { | 444 void WindowManagerState::ProcessDebugAccelerator(const ui::Event& event) { |
| 445 if (event.type() != ui::ET_KEY_PRESSED) | 445 if (event.type() != ui::ET_KEY_PRESSED) |
| 446 return; | 446 return; |
| 447 | 447 |
| 448 const ui::KeyEvent& key_event = *event.AsKeyEvent(); | 448 const ui::KeyEvent& key_event = *event.AsKeyEvent(); |
| 449 for (const DebugAccelerator& accelerator : debug_accelerators_) { | 449 for (const DebugAccelerator& accelerator : debug_accelerators_) { |
| (...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 635 window->RemoveObserver(this); | 635 window->RemoveObserver(this); |
| 636 orphaned_window_manager_display_roots_.erase(iter); | 636 orphaned_window_manager_display_roots_.erase(iter); |
| 637 return; | 637 return; |
| 638 } | 638 } |
| 639 } | 639 } |
| 640 NOTREACHED(); | 640 NOTREACHED(); |
| 641 } | 641 } |
| 642 | 642 |
| 643 } // namespace ws | 643 } // namespace ws |
| 644 } // namespace ui | 644 } // namespace ui |
| OLD | NEW |