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

Unified Diff: chrome/browser/ui/views/toolbar/toolbar_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 (sadrul's comments) 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/toolbar/toolbar_view.cc
diff --git a/chrome/browser/ui/views/toolbar/toolbar_view.cc b/chrome/browser/ui/views/toolbar/toolbar_view.cc
index d1624fcd5b4158d8c7e07c5873429a433d16dd82..2c127b7bd4f736baaa0dcb1a26f07754bb613172 100644
--- a/chrome/browser/ui/views/toolbar/toolbar_view.cc
+++ b/chrome/browser/ui/views/toolbar/toolbar_view.cc
@@ -329,6 +329,16 @@ views::View* ToolbarView::GetTranslateBubbleAnchor() {
: app_menu_button_;
}
+void ToolbarView::OnBubbleCreatedForAnchor(views::View* anchor_view,
+ views::Widget* bubble_widget) {
+ if (bubble_widget &&
+ (anchor_view == location_bar()->star_view() ||
+ anchor_view == location_bar()->save_credit_card_icon_view() ||
+ anchor_view == location_bar()->translate_icon_view())) {
Peter Kasting 2016/01/28 20:42:12 Nit: {} not necessary
varkha 2016/01/28 22:04:52 I am used to the style guide allowing this[1] for
Peter Kasting 2016/01/28 22:21:22 Right, it's allowed if you want it. Probably more
+ bubble_widget->AddObserver(static_cast<BubbleIconView*>(anchor_view));
+ }
+}
+
void ToolbarView::ExecuteExtensionCommand(
const extensions::Extension* extension,
const extensions::Command& command) {
« no previous file with comments | « chrome/browser/ui/views/toolbar/toolbar_view.h ('k') | chrome/browser/ui/views/translate/translate_bubble_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698