Description[Mac] Factor out keyboard shortcut handling from ChromeEventProcessingWindow.
This pulls the redispatching logic into CommandDispatcher which allows
it to be reused independent of Chrome, and is a major step towards enabling
keyboard shortcuts in MacViews. By using CommandDispatcher in
NativeWidgetMacNSWindow, main menu key equivalents (e.g. Cmd+c) now
work when the WebContents has focus.
Chrome-specific parts are moved to ChromeCommandDispatcherDelegate,
which will, in future, also be used by the Views browser in mac_views_browser=1
builds.
This includes minor changes to webview_example to demo command redispatch
in non-Chrome Views. E.g. Cmd+q now works in views_examples_with_content_exe
when the webview is focused.
Some test coverage is provided by GlobalKeyboardShortcutsTest.
BUG=508438, 504677
TEST=All keyboard shortcuts continue to work as before.
Committed: https://crrev.com/4c458c5afb65ce9bb7c4f3b1825825db0a4540a0
Cr-Commit-Position: refs/heads/master@{#346530}
Patch Set 1 #Patch Set 2 : Pass native -performKeyEquivalent as block. #Patch Set 3 : Sync and rebase. #Patch Set 4 : Sync #Patch Set 5 : Sync #Patch Set 6 : Fix a few things. #
Total comments: 23
Patch Set 7 : Address comments. #Patch Set 8 : Separate CommandDispatcher and CommandDispatcherDelegate. #
Total comments: 9
Patch Set 9 : Address comments. #
Total comments: 46
Patch Set 10 : Address comments. #Patch Set 11 : Similarity=30 #
Total comments: 6
Patch Set 12 : Address comments. #
Total comments: 22
Patch Set 13 : Address comments. #Patch Set 14 : Oops missed one. #Patch Set 15 : And a couple more minor comment nits. #
Total comments: 8
Patch Set 16 : Address comments. #Patch Set 17 : Minor comment fix. #
Total comments: 2
Patch Set 18 : Address comments. #Patch Set 19 : UI_BASE_EXPORT CommandDispatcher #Dependent Patchsets: Messages
Total messages: 33 (6 generated)
|