Chromium Code Reviews| Index: components/mus/ws/window_manager_state.cc |
| diff --git a/components/mus/ws/window_manager_state.cc b/components/mus/ws/window_manager_state.cc |
| index 681a52345687cd9536817f4c5dbb4ef4d18303b6..cb4e536ba4bf489cb54e6f0cfc159ebd5c17bcde 100644 |
| --- a/components/mus/ws/window_manager_state.cc |
| +++ b/components/mus/ws/window_manager_state.cc |
| @@ -214,6 +214,8 @@ void WindowManagerState::Deactivate() { |
| } |
| void WindowManagerState::ProcessEvent(const ui::Event& event) { |
| + RunDebugShortcuts(event); |
| + |
| // If this is still waiting for an ack from a previously sent event, then |
| // queue up the event to be dispatched once the ack is received. |
| if (event_ack_timer_.IsRunning()) { |
| @@ -336,6 +338,20 @@ void WindowManagerState::DispatchInputEventToWindowImpl( |
| tree->DispatchInputEvent(target, event); |
| } |
| +void WindowManagerState::RunDebugShortcuts(const ui::Event& event) { |
|
msw
2016/05/05 22:12:08
Should this instead use accelerators, like ash/acc
James Cook
2016/05/05 22:53:18
It seems like overkill. Ash already has an acceler
msw
2016/05/05 23:10:06
See if it's easy to add an accelerator to the Even
|
| +#if !defined(NDEBUG) |
| + if (event.type() != ui::ET_KEY_PRESSED) |
| + return; |
| + const ui::KeyEvent* key = event.AsKeyEvent(); |
| + if (key->key_code() == ui::VKEY_S && key->IsControlDown() |
| + && key->IsShiftDown() && key->IsAltDown()) { |
| + // Error so it will be collected in system logs. |
| + LOG(ERROR) << "ServerWindow hierarchy:\n" |
| + << root()->GetDebugWindowHierarchy(); |
| + } |
| +#endif |
| +} |
| + |
| //////////////////////////////////////////////////////////////////////////////// |
| // EventDispatcherDelegate: |