Extension Toolbar redesign, part 1 (overflow)
commit4ad2cf722f04ad38b8c4900eb6ffb8379454cc14
authorfinnur@chromium.org <finnur@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Thu, 3 Jul 2014 17:36:53 +0000 (3 17:36 +0000)
committerfinnur@chromium.org <finnur@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Thu, 3 Jul 2014 17:36:53 +0000 (3 17:36 +0000)
treef5a21990574086beeccb6f186797179a68773f7a
parentd75308fa7961bd6b93f4932ba16700b52f87de1b
Extension Toolbar redesign, part 1 (overflow)

Add a flag that allows the browser action icons to overflow into the wrench menu and make sure all extensions without browser action/page action icon show at least the default icon.

The overflow is implemented by introducing a master/slave mode for the BrowserActionsContainer (BAC) class. The BAC next to the Omnibox is considered the master and works as before. The BAC in inside the wrench menu is considered the slave and shows only the icons that the master does not.

Known issues:

- Dragging between BAC objects works, but in one direction only (from slave to master). The other way doesn't work because the wrench menu isn't a drop target for browser action icons (and doesn't open).
- Context menu handling for browser action icons needs to be changed to prevent a nested messageloop when you right-click two icons in a row.
- Badges on icons in the overflow container need adjusting (appear a bit too low).

BUG=391280
TBR=cpu

Review URL: https://codereview.chromium.org/324393002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@281291 0039d316-1c4b-4281-b951-d872f2087c98
22 files changed:
chrome/app/chrome_command_ids.h
chrome/browser/ui/toolbar/wrench_menu_model.cc
chrome/browser/ui/toolbar/wrench_menu_model.h
chrome/browser/ui/views/toolbar/browser_action_view.cc
chrome/browser/ui/views/toolbar/browser_action_view.h
chrome/browser/ui/views/toolbar/browser_actions_container.cc
chrome/browser/ui/views/toolbar/browser_actions_container.h
chrome/browser/ui/views/toolbar/extension_toolbar_menu_view.cc [new file with mode: 0644]
chrome/browser/ui/views/toolbar/extension_toolbar_menu_view.h [new file with mode: 0644]
chrome/browser/ui/views/toolbar/toolbar_view.cc
chrome/browser/ui/views/toolbar/wrench_menu.cc
chrome/chrome_browser_ui.gypi
chrome/chrome_common.gypi
chrome/common/extensions/chrome_manifest_handlers.cc
chrome/common/extensions/manifest_handlers/synthesize_browser_action_handler.cc [new file with mode: 0644]
chrome/common/extensions/manifest_handlers/synthesize_browser_action_handler.h [new file with mode: 0644]
extensions/common/feature_switch.cc
extensions/common/feature_switch.h
extensions/common/manifest_constants.cc
extensions/common/manifest_constants.h
extensions/common/switches.cc
extensions/common/switches.h