diff options
author | mkwst@chromium.org <mkwst@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-04-30 12:14:11 +0000 |
---|---|---|
committer | mkwst@chromium.org <mkwst@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-04-30 12:14:11 +0000 |
commit | 14c061744bfcbb095e1bcbd22fc40407410119bb (patch) | |
tree | 5d12f44de4326f132529430e9420f2e0bd2630fe /chrome/browser/ui/browser_command_controller.cc | |
parent | 5486f519ce55f4a379c3d35e46eeee8eacf89129 (diff) | |
download | chromium_src-14c061744bfcbb095e1bcbd22fc40407410119bb.zip chromium_src-14c061744bfcbb095e1bcbd22fc40407410119bb.tar.gz chromium_src-14c061744bfcbb095e1bcbd22fc40407410119bb.tar.bz2 |
Password bubble: ManagePasswordsIconView is now a BubbleIconView.
This CL introduces a new browser command to open the Manage Passwords bubble,
and converts the ManagePasswordsIconView class into a subclass of
BubbleIconView, which uses the new command to control the bubble's state.
This allows us to more easily test the view and the UI controller, as each
object's job is now more clearly defined (and the view is now doing a good
deal less work), and to independently verify that the command is doing the
right thing.
After this CL, we'll (finally!) have something approaching reasonable test
coverage for the core of the views code.
----------------------------------------------------------------------------
This is a re-land of r266859, which was reverted due to LSAN errors. The
original review is https://codereview.chromium.org/246393004/
----------------------------------------------------------------------------
BUG=365678
TBR=vabr@chromium.org,pkasting@chromium.org,cpu@chromium.org
Review URL: https://codereview.chromium.org/254263002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@267195 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/ui/browser_command_controller.cc')
-rw-r--r-- | chrome/browser/ui/browser_command_controller.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/chrome/browser/ui/browser_command_controller.cc b/chrome/browser/ui/browser_command_controller.cc index 14ee6d5..da490f1 100644 --- a/chrome/browser/ui/browser_command_controller.cc +++ b/chrome/browser/ui/browser_command_controller.cc @@ -562,6 +562,11 @@ void BrowserCommandController::ExecuteCommandWithDisposition( case IDC_TRANSLATE_PAGE: Translate(browser_); break; + case IDC_MANAGE_PASSWORDS_FOR_PAGE: + ManagePasswordsForPage(browser_); + break; + + // Page encoding commands case IDC_ENCODING_AUTO_DETECT: browser_->ToggleEncodingAutoDetect(); break; @@ -921,6 +926,7 @@ void BrowserCommandController::InitCommandState() { // Page-related commands command_updater_.UpdateCommandEnabled(IDC_EMAIL_PAGE_LOCATION, true); command_updater_.UpdateCommandEnabled(IDC_BOOKMARK_PAGE_FROM_STAR, true); + command_updater_.UpdateCommandEnabled(IDC_MANAGE_PASSWORDS_FOR_PAGE, true); command_updater_.UpdateCommandEnabled(IDC_ENCODING_AUTO_DETECT, true); command_updater_.UpdateCommandEnabled(IDC_ENCODING_UTF8, true); command_updater_.UpdateCommandEnabled(IDC_ENCODING_UTF16LE, true); |