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

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 (reverted a bad change) 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..84ff4e5bee5d2ee29c201a2920c5691542f473d8 100644
--- a/chrome/browser/ui/views/passwords/manage_passwords_bubble_view.cc
+++ b/chrome/browser/ui/views/passwords/manage_passwords_bubble_view.cc
@@ -33,6 +33,7 @@
#include "ui/views/layout/grid_layout.h"
#include "ui/views/layout/layout_constants.h"
#include "ui/views/widget/widget.h"
+#include "ui/views/widget/widget_observer_view.h"
int ManagePasswordsBubbleView::auto_signin_toast_timeout_ = 3;
@@ -742,7 +743,7 @@ void ManagePasswordsBubbleView::ShowBubble(
BrowserView* browser_view = BrowserView::GetBrowserViewForBrowser(browser);
bool is_fullscreen = browser_view->IsFullscreen();
- ManagePasswordsIconViews* anchor_view =
+ views::WidgetObserverView* anchor_view =
is_fullscreen
? NULL
: browser_view->GetLocationBarView()->manage_passwords_icon_view();
@@ -752,7 +753,9 @@ 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_);
+ anchor_view->ObserveWidget(manage_passwords_bubble_widget);
// 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