• Elly Fong-Jones's avatar
    mac: add Tab menu · 745a72b8
    Elly Fong-Jones authored
    This change adds a new top-level menu to the system menu, used to
    manipulate and select tabs in the current window. This menu contains
    some static items, moved from the Window menu, and then a list of
    entries corresponding to open tabs in the current window. Specifically,
    this change:
    
    1) Adds a new class, TabMenuBridge, which binds a TabStripModel to a
       NSMenu;
    2) Adds a new menu item to the main menu named "Tab";
    3) Creates a TabMenuBridge for any tabbed browser window in the
       app controller.
    
    The motivation for this change was twofold: first, to allow easier
    access to commands that are currently only present in the tab's
    context menu, and second, to allow easier access to tabs in crowded
    tabstrips. The first purpose is well-defined and understood but the
    second is very much experimental.
    
    Testing:
    Build, run, and enjoy the new Tab menu :). There are some unit tests in
    TabMenuBridgeTest.* as well.
    
    Future work:
    * Renaming the static items to better fit their new context. This was
      not done here to avoid breaking existing user key equivalents, which
      identify items by their full name.
    * Exploring other orderings of tabs in this menu.
    * Adding other tab actions to this menu, like "Bookmark" or possibly
      page actions.
    * Adding a search bar to search within tab titles/origins?
    * Adding key equivalents for the static actions (which will resolve
      the actual accessibility bug this commit is for)
    
    Bug: 818261
    Change-Id: I790cc2c5a4468719e42b782a318864ecd81bd1f5
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1728718
    Commit-Queue: Elly Fong-Jones <ellyjones@chromium.org>
    Reviewed-by: default avatarRobert Sesek <rsesek@chromium.org>
    Reviewed-by: default avatarAvi Drissman <avi@chromium.org>
    Reviewed-by: default avatarLeonard Grey <lgrey@chromium.org>
    Auto-Submit: Elly Fong-Jones <ellyjones@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#683682}
    745a72b8
chrome_command_ids.h 16.4 KB