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

Side by Side 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 (missing member init) Created 4 years, 10 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/views/toolbar/toolbar_view.h" 5 #include "chrome/browser/ui/views/toolbar/toolbar_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/i18n/number_formatting.h" 10 #include "base/i18n/number_formatting.h"
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after
322 : app_menu_button_; 322 : app_menu_button_;
323 } 323 }
324 324
325 views::View* ToolbarView::GetTranslateBubbleAnchor() { 325 views::View* ToolbarView::GetTranslateBubbleAnchor() {
326 views::View* translate_icon_view = location_bar()->translate_icon_view(); 326 views::View* translate_icon_view = location_bar()->translate_icon_view();
327 return (translate_icon_view && translate_icon_view->visible()) 327 return (translate_icon_view && translate_icon_view->visible())
328 ? translate_icon_view 328 ? translate_icon_view
329 : app_menu_button_; 329 : app_menu_button_;
330 } 330 }
331 331
332 void ToolbarView::OnBubbleCreatedForAnchor(views::View* anchor_view,
333 views::Widget* bubble_widget) {
334 if (bubble_widget &&
335 (anchor_view == location_bar()->star_view() ||
336 anchor_view == location_bar()->save_credit_card_icon_view() ||
337 anchor_view == location_bar()->translate_icon_view())) {
338 DCHECK(anchor_view);
339 bubble_widget->AddObserver(static_cast<BubbleIconView*>(anchor_view));
340 }
341 }
342
332 void ToolbarView::ExecuteExtensionCommand( 343 void ToolbarView::ExecuteExtensionCommand(
333 const extensions::Extension* extension, 344 const extensions::Extension* extension,
334 const extensions::Command& command) { 345 const extensions::Command& command) {
335 browser_actions_->ExecuteExtensionCommand(extension, command); 346 browser_actions_->ExecuteExtensionCommand(extension, command);
336 } 347 }
337 348
338 int ToolbarView::GetMaxBrowserActionsWidth() const { 349 int ToolbarView::GetMaxBrowserActionsWidth() const {
339 // The browser actions container is allowed to grow, but only up until the 350 // The browser actions container is allowed to grow, but only up until the
340 // omnibox reaches its minimum size. So its maximum allowed width is its 351 // omnibox reaches its minimum size. So its maximum allowed width is its
341 // current size, plus any that the omnibox could give up. 352 // current size, plus any that the omnibox could give up.
(...skipping 469 matching lines...) Expand 10 before | Expand all | Expand 10 after
811 void ToolbarView::OnShowHomeButtonChanged() { 822 void ToolbarView::OnShowHomeButtonChanged() {
812 Layout(); 823 Layout();
813 SchedulePaint(); 824 SchedulePaint();
814 } 825 }
815 826
816 int ToolbarView::content_shadow_height() const { 827 int ToolbarView::content_shadow_height() const {
817 return GetLayoutConstant( 828 return GetLayoutConstant(
818 (browser_->host_desktop_type() == chrome::HOST_DESKTOP_TYPE_ASH) ? 829 (browser_->host_desktop_type() == chrome::HOST_DESKTOP_TYPE_ASH) ?
819 TOOLBAR_CONTENT_SHADOW_HEIGHT_ASH : TOOLBAR_CONTENT_SHADOW_HEIGHT); 830 TOOLBAR_CONTENT_SHADOW_HEIGHT_ASH : TOOLBAR_CONTENT_SHADOW_HEIGHT);
820 } 831 }
OLDNEW
« 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