Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(808)

Unified Diff: chrome/browser/ui/views/location_bar/location_bar_view.cc

Issue 246393004: Password bubble: Introduce a command to open the bubble. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Test. Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/views/location_bar/location_bar_view.cc
diff --git a/chrome/browser/ui/views/location_bar/location_bar_view.cc b/chrome/browser/ui/views/location_bar/location_bar_view.cc
index d7ecd3b451b52c7b3072cb6045bd56869145412f..7fb1f88f2a3526233a433d59652fa005be0268ee 100644
--- a/chrome/browser/ui/views/location_bar/location_bar_view.cc
+++ b/chrome/browser/ui/views/location_bar/location_bar_view.cc
@@ -387,7 +387,8 @@ void LocationBarView::Init() {
open_pdf_in_reader_view_ = new OpenPDFInReaderView();
AddChildView(open_pdf_in_reader_view_);
- manage_passwords_icon_view_ = new ManagePasswordsIconView(delegate_);
+ manage_passwords_icon_view_ =
+ new ManagePasswordsIconView(delegate_, command_updater());
manage_passwords_icon_view_->set_id(VIEW_ID_MANAGE_PASSWORDS_ICON_BUTTON);
AddChildView(manage_passwords_icon_view_);
@@ -1227,6 +1228,8 @@ bool LocationBarView::RefreshManagePasswordsIconView() {
const bool was_visible = manage_passwords_icon_view_->visible();
manage_passwords_icon_view_->Update(
ManagePasswordsBubbleUIController::FromWebContents(web_contents));
+ command_updater()->UpdateCommandEnabled(
+ IDC_MANAGE_PASSWORDS_FOR_PAGE, manage_passwords_icon_view_->visible());
return was_visible != manage_passwords_icon_view_->visible();
}

Powered by Google App Engine
This is Rietveld 408576698