Clean up a lot of inconsistency in bookmark command handling.
commit348f501feb009f13c2962f704286a6b0eb58f5df
authorpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Thu, 2 Jan 2014 20:00:02 +0000 (2 20:00 +0000)
committerpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Thu, 2 Jan 2014 20:00:02 +0000 (2 20:00 +0000)
treec0f43c602e399bde6f2dc9b15f736988e7c7f2cf
parentf73255529f328059ccda34378cc960ecf18adff4
Clean up a lot of inconsistency in bookmark command handling.

First, this disconnects the omnibox editing state from whether IDC_BOOKMARK_PAGE
is enabled.  See comment 8 on the bug for why I'm making this change.

Second, this brings all three platforms into sync on when the bookmark star is
actually visible, and what command it executes when clicked
(IDC_BOOKMARK_PAGE_FROM_STAR -- see bug 144586).  To do this and reduce code
duplication I'm hoisting some functionality into LocationBar.  Probably more
functionality is duplicated across the platform-specific subclasses that could
also be hoisted here, but let's not boil the ocean.

BUG=317578
TEST=Ctrl-D should always bookmark the current page, even if omnibox edits are in progress.
R=msw@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@242783 0039d316-1c4b-4281-b951-d872f2087c98
chrome/browser/ui/browser_command_controller.cc
chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.h
chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm
chrome/browser/ui/cocoa/location_bar/star_decoration.mm
chrome/browser/ui/gtk/location_bar_view_gtk.cc
chrome/browser/ui/omnibox/location_bar.cc [new file with mode: 0644]
chrome/browser/ui/omnibox/location_bar.h
chrome/browser/ui/views/location_bar/location_bar_view.cc
chrome/browser/ui/views/location_bar/location_bar_view.h
chrome/chrome_browser_ui.gypi
chrome/test/base/test_browser_window.h