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

Side by Side Diff: chrome/browser/ui/views/toolbar/toolbar_view.cc

Issue 2374253002: Fix bookmark bubble/star view highlighting for Harmony. (Closed)
Patch Set: Created 4 years, 2 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 290 matching lines...) Expand 10 before | Expand all | Expand 10 after
301 : app_menu_button_; 301 : app_menu_button_;
302 } 302 }
303 303
304 views::View* ToolbarView::GetTranslateBubbleAnchor() { 304 views::View* ToolbarView::GetTranslateBubbleAnchor() {
305 views::View* translate_icon_view = location_bar()->translate_icon_view(); 305 views::View* translate_icon_view = location_bar()->translate_icon_view();
306 return (translate_icon_view && translate_icon_view->visible()) 306 return (translate_icon_view && translate_icon_view->visible())
307 ? translate_icon_view 307 ? translate_icon_view
308 : app_menu_button_; 308 : app_menu_button_;
309 } 309 }
310 310
311 void ToolbarView::OnBubbleCreatedForAnchor(views::View* anchor_view, 311 void ToolbarView::OnBubbleCreatedForAnchor(views::View* anchor_view,
Evan Stade 2016/09/28 22:30:58 I honestly don't see what the purpose of this func
312 views::Widget* bubble_widget) { 312 views::Widget* bubble_widget) {
313 if (bubble_widget && 313 if (bubble_widget &&
314 (anchor_view == location_bar()->star_view() || 314 (anchor_view == location_bar()->save_credit_card_icon_view() ||
315 anchor_view == location_bar()->save_credit_card_icon_view() ||
316 anchor_view == location_bar()->translate_icon_view())) { 315 anchor_view == location_bar()->translate_icon_view())) {
317 DCHECK(anchor_view); 316 DCHECK(anchor_view);
318 bubble_widget->AddObserver(static_cast<BubbleIconView*>(anchor_view)); 317 bubble_widget->AddObserver(static_cast<BubbleIconView*>(anchor_view));
319 } 318 }
320 } 319 }
321 320
322 int ToolbarView::GetMaxBrowserActionsWidth() const { 321 int ToolbarView::GetMaxBrowserActionsWidth() const {
323 // The browser actions container is allowed to grow, but only up until the 322 // The browser actions container is allowed to grow, but only up until the
324 // omnibox reaches its minimum size. So its maximum allowed width is its 323 // omnibox reaches its minimum size. So its maximum allowed width is its
325 // current size, plus any that the omnibox could give up. 324 // current size, plus any that the omnibox could give up.
(...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after
742 if (OutdatedUpgradeBubbleView::IsAvailable()) { 741 if (OutdatedUpgradeBubbleView::IsAvailable()) {
743 OutdatedUpgradeBubbleView::ShowBubble(app_menu_button_, browser_, 742 OutdatedUpgradeBubbleView::ShowBubble(app_menu_button_, browser_,
744 auto_update_enabled); 743 auto_update_enabled);
745 } 744 }
746 } 745 }
747 746
748 void ToolbarView::OnShowHomeButtonChanged() { 747 void ToolbarView::OnShowHomeButtonChanged() {
749 Layout(); 748 Layout();
750 SchedulePaint(); 749 SchedulePaint();
751 } 750 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698