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

Unified Diff: chrome/browser/ui/views/passwords/manage_passwords_bubble_view.cc

Issue 1518543002: Adds MD ink ripple animations to buttons within location bar (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Adds MD ink ripple animations to buttons within location bar (missing member init) Created 4 years, 11 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/passwords/manage_passwords_bubble_view.cc
diff --git a/chrome/browser/ui/views/passwords/manage_passwords_bubble_view.cc b/chrome/browser/ui/views/passwords/manage_passwords_bubble_view.cc
index cd0238673a73da09b1bf330b4ee2ae17b5ff2437..8c80d03f6db7426e4207da2145da9465ad096bf0 100644
--- a/chrome/browser/ui/views/passwords/manage_passwords_bubble_view.cc
+++ b/chrome/browser/ui/views/passwords/manage_passwords_bubble_view.cc
@@ -752,7 +752,10 @@ void ManagePasswordsBubbleView::ShowBubble(
if (is_fullscreen)
manage_passwords_bubble_->set_parent_window(web_contents->GetNativeView());
- views::BubbleDelegateView::CreateBubble(manage_passwords_bubble_);
+ views::Widget* manage_passwords_bubble_widget =
+ views::BubbleDelegateView::CreateBubble(manage_passwords_bubble_);
+ if (anchor_view)
+ manage_passwords_bubble_widget->AddObserver(anchor_view);
// Adjust for fullscreen after creation as it relies on the content size.
if (is_fullscreen) {
@@ -782,13 +785,12 @@ content::WebContents* ManagePasswordsBubbleView::web_contents() const {
ManagePasswordsBubbleView::ManagePasswordsBubbleView(
content::WebContents* web_contents,
- ManagePasswordsIconViews* anchor_view,
+ views::View* anchor_view,
DisplayReason reason)
: LocationBarBubbleDelegateView(anchor_view, web_contents),
model_(web_contents,
reason == AUTOMATIC ? ManagePasswordsBubbleModel::AUTOMATIC
: ManagePasswordsBubbleModel::USER_ACTION),
- anchor_view_(anchor_view),
initially_focused_view_(nullptr) {
// Compensate for built-in vertical padding in the anchor view's image.
set_anchor_view_insets(gfx::Insets(5, 0, 5, 0));

Powered by Google App Engine
This is Rietveld 408576698