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

Unified Diff: chrome/browser/ui/views/location_bar/zoom_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/location_bar/zoom_bubble_view.cc
diff --git a/chrome/browser/ui/views/location_bar/zoom_bubble_view.cc b/chrome/browser/ui/views/location_bar/zoom_bubble_view.cc
index f00115d3b698d00d53b66a6330f00244cf1c3c81..c503bec7aa5a5bb68437a5406cede4ae56d4fe5a 100644
--- a/chrome/browser/ui/views/location_bar/zoom_bubble_view.cc
+++ b/chrome/browser/ui/views/location_bar/zoom_bubble_view.cc
@@ -46,7 +46,7 @@ void ZoomBubbleView::ShowBubble(content::WebContents* web_contents,
bool is_fullscreen = browser_view->IsFullscreen();
bool anchor_to_view = !is_fullscreen ||
browser_view->immersive_mode_controller()->IsRevealed();
- views::View* anchor_view = anchor_to_view ?
+ ZoomView* anchor_view = anchor_to_view ?
browser_view->GetLocationBarView()->zoom_view() : NULL;
// Find the extension that initiated the zoom change, if any.
@@ -82,7 +82,10 @@ void ZoomBubbleView::ShowBubble(content::WebContents* web_contents,
if (!anchor_to_view)
zoom_bubble_->set_parent_window(web_contents->GetNativeView());
- views::BubbleDelegateView::CreateBubble(zoom_bubble_);
+ views::Widget* zoom_bubble_widget =
+ views::BubbleDelegateView::CreateBubble(zoom_bubble_);
+ if (anchor_view)
+ zoom_bubble_widget->AddObserver(anchor_view);
// Adjust for fullscreen after creation as it relies on the content size.
if (is_fullscreen)

Powered by Google App Engine
This is Rietveld 408576698