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

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

Issue 1966643002: Integrate new MD update menu icons. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Renamed icons - interim name until larger refactor. Created 4 years, 6 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 640 matching lines...) Expand 10 before | Expand all | Expand 10 after
651 bool animate) { 651 bool animate) {
652 // There's no app menu in tabless windows. 652 // There's no app menu in tabless windows.
653 if (!app_menu_button_) 653 if (!app_menu_button_)
654 return; 654 return;
655 655
656 // Showing the bubble requires |app_menu_button_| to be in a widget. See 656 // Showing the bubble requires |app_menu_button_| to be in a widget. See
657 // comment in ConflictingModuleView for details. 657 // comment in ConflictingModuleView for details.
658 DCHECK(app_menu_button_->GetWidget()); 658 DCHECK(app_menu_button_->GetWidget());
659 659
660 base::string16 accname_app = l10n_util::GetStringUTF16(IDS_ACCNAME_APP); 660 base::string16 accname_app = l10n_util::GetStringUTF16(IDS_ACCNAME_APP);
661 if (type == AppMenuBadgeController::BADGE_TYPE_UPGRADE_NOTIFICATION) { 661 if (type == AppMenuBadgeController::BadgeType::UPGRADE_NOTIFICATION) {
662 accname_app = l10n_util::GetStringFUTF16( 662 accname_app = l10n_util::GetStringFUTF16(
663 IDS_ACCNAME_APP_UPGRADE_RECOMMENDED, accname_app); 663 IDS_ACCNAME_APP_UPGRADE_RECOMMENDED, accname_app);
664 } 664 }
665 app_menu_button_->SetAccessibleName(accname_app); 665 app_menu_button_->SetAccessibleName(accname_app);
666 app_menu_button_->SetSeverity(severity, animate); 666 app_menu_button_->SetSeverity(type, severity, animate);
667 667
668 // Keep track of whether we were showing the badge before, so we don't send 668 // Keep track of whether we were showing the badge before, so we don't send
669 // multiple UMA events for example when multiple Chrome windows are open. 669 // multiple UMA events for example when multiple Chrome windows are open.
670 static bool incompatibility_badge_showing = false; 670 static bool incompatibility_badge_showing = false;
671 // Save the old value before resetting it. 671 // Save the old value before resetting it.
672 bool was_showing = incompatibility_badge_showing; 672 bool was_showing = incompatibility_badge_showing;
673 incompatibility_badge_showing = false; 673 incompatibility_badge_showing = false;
674 674
675 if (type == AppMenuBadgeController::BADGE_TYPE_INCOMPATIBILITY_WARNING) { 675 if (type == AppMenuBadgeController::BadgeType::INCOMPATIBILITY_WARNING) {
676 if (!was_showing) { 676 if (!was_showing) {
677 content::RecordAction(UserMetricsAction("ConflictBadge")); 677 content::RecordAction(UserMetricsAction("ConflictBadge"));
678 #if defined(OS_WIN) 678 #if defined(OS_WIN)
679 ConflictingModuleView::MaybeShow(browser_, app_menu_button_); 679 ConflictingModuleView::MaybeShow(browser_, app_menu_button_);
680 #endif 680 #endif
681 } 681 }
682 incompatibility_badge_showing = true; 682 incompatibility_badge_showing = true;
683 return; 683 return;
684 } 684 }
685 } 685 }
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
796 SchedulePaint(); 796 SchedulePaint();
797 } 797 }
798 798
799 int ToolbarView::content_shadow_height() const { 799 int ToolbarView::content_shadow_height() const {
800 #if defined(USE_ASH) 800 #if defined(USE_ASH)
801 return GetLayoutConstant(TOOLBAR_CONTENT_SHADOW_HEIGHT_ASH); 801 return GetLayoutConstant(TOOLBAR_CONTENT_SHADOW_HEIGHT_ASH);
802 #else 802 #else
803 return GetLayoutConstant(TOOLBAR_CONTENT_SHADOW_HEIGHT); 803 return GetLayoutConstant(TOOLBAR_CONTENT_SHADOW_HEIGHT);
804 #endif 804 #endif
805 } 805 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698