Descriptionmac: Create a static mapping of accelerators in the main menu.
This change allows for two new functionalities:
1. Compare a mac accelerator with an extension accelerator.
2. Determine whether an accelerator is a standard main-menu accelerator without
a dynamic query of the main menu.
Accelerators generated from the extension manifest use cross-platform
key_codes/modifiers. Previously, there was no canonical way to get an
accelerator from the mac main menu. There was a mapping of accelerators from
the toolbar menu, but those accelerators only included mac key_codes/modifiers,
and not cross-platform key_codes/modifiers.
This CL creates a static mapping of all accelerators used in the main menu and
toolbar menu. The mapping includes the command_id, the cross-platform key_code,
and the Cocoa modifiers. The cross-platform modifiers and the Cocoa
keyEquivalent are generated on demand.
BUG=342484
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=250793
Patch Set 1 : Another self-review. #
Total comments: 55
Patch Set 2 : Draft - not ready for review. #Patch Set 3 : Draft - not ready for review. #Patch Set 4 : Draft - not ready for review. #Patch Set 5 : More style fixes. #Patch Set 6 : Minor fix: Fix compile error on mac_rel. #
Total comments: 12
Patch Set 7 : Style comments from rsesek. #Patch Set 8 : More style. #Patch Set 9 : Yet more capitalization of cocoa. #
Total comments: 4
Patch Set 10 : Indent error. #Messages
Total messages: 14 (0 generated)
|