DescriptionAllow permission bubbles to participate in key event dispatch as if they were a Browser.
Accomplish this by allowing the `CommandDispatcher` we use for
ChomeEventProcessingWindows to bubble up key handling, and command
validation/dispatch. Dispatch goes up to a parent window's
CommandDispatcher when certain conditions are met.
Currently all ChomeEventProcessingWindows and Views'
NativeWidgetMacNSWindows have a CommandDispatcher, but only browser
windows provide a CommandHandler. By asking the CommandHandler in the
parent window, we can validate commands in the mainMenu, then forward
the -commandDispatch: action from the menu item when NSMenu calls it on
the key window (which might not be a browser).
Adds a rather fun interactive UI test for this that runs with Views and
Cocoa permissions bubbles, and tests commands dispatched via the
mainMenu (Cmd+w, Cmd+Alt+Left) and performKeyEquivalent (Cmd+Shift+'{')
BUG=603881, 679339
Review-Url: https://codereview.chromium.org/2666523002
Cr-Commit-Position: refs/heads/master@{#447864}
Committed: https://chromium.googlesource.com/chromium/src/+/e91c25b113011f055428c46609e19ce6550b41ea
Patch Set 1 #Patch Set 2 : tests complete #Patch Set 3 : Better, and fixes mac views as well \o/ #Patch Set 4 : Parameterize test, Comments, nits #
Total comments: 6
Patch Set 5 : comments, fix permission->type missed in a refactor #Messages
Total messages: 47 (39 generated)
|