DevTools: context-aware console.clear, element.hide shortcuts

Before, pressing 'H' or 'Ctrl+L' on ANY panel would perform the
action (hide selected element, clear console). This CL makes both
shortcuts execute only when the respective panel/view is showing.

This allows 'Ctrl+L' to focus Omnibox when Console is not visible.

Bug: 915676
Change-Id: Ie5ef04786fcd240a393524f429cb45a3951cd5d0
Reviewed-by: Joel Einbinder <>
Commit-Queue: Erik Luo <>
Cr-Commit-Position: refs/heads/master@{#622211}
3 files changed