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

Unified Diff: chrome/browser/ui/views/toolbar/toolbar_view.cc

Issue 2039403002: Renamed AppMenuBadgeController to AppMenuIconController (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 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 25f0b5eb838087ba5367b2b4897872ef7c935487..f9df613a9160725b0c28d1b5d59683f918d6713f 100644
--- a/chrome/browser/ui/views/toolbar/toolbar_view.cc
+++ b/chrome/browser/ui/views/toolbar/toolbar_view.cc
@@ -129,7 +129,7 @@ ToolbarView::ToolbarView(Browser* browser)
browser_actions_(nullptr),
app_menu_button_(nullptr),
browser_(browser),
- badge_controller_(browser->profile(), this),
+ icon_controller_(browser->profile(), this),
display_mode_(browser->SupportsWindowFeature(Browser::FEATURE_TABSTRIP)
? DISPLAYMODE_NORMAL
: DISPLAYMODE_LOCATION) {
@@ -253,11 +253,11 @@ void ToolbarView::Init() {
#endif
#endif // OS_CHROMEOS
- // Add any necessary badges to the menu item based on the system state.
+ // Add any necessary icons to the menu item based on the system state.
msw 2016/06/07 01:01:38 nit: Should this be "Set the button icon based on
msw 2016/06/07 16:56:49 ping
// Do this after |app_menu_button_| has been added as a bubble may be shown
// that needs the widget (widget found by way of app_menu_button_->
// GetWidget()).
- badge_controller_.UpdateDelegate();
+ icon_controller_.UpdateDelegate();
location_bar_->Init();
@@ -646,9 +646,9 @@ bool ToolbarView::DoesIntersectRect(const views::View* target,
return ViewTargeterDelegate::DoesIntersectRect(this, rect);
}
-void ToolbarView::UpdateBadgeSeverity(AppMenuBadgeController::BadgeType type,
- AppMenuIconPainter::Severity severity,
- bool animate) {
+void ToolbarView::UpdateIconSeverity(AppMenuIconController::IconType type,
+ AppMenuIconPainter::Severity severity,
+ bool animate) {
// There's no app menu in tabless windows.
if (!app_menu_button_)
return;
@@ -658,7 +658,7 @@ void ToolbarView::UpdateBadgeSeverity(AppMenuBadgeController::BadgeType type,
DCHECK(app_menu_button_->GetWidget());
base::string16 accname_app = l10n_util::GetStringUTF16(IDS_ACCNAME_APP);
- if (type == AppMenuBadgeController::BadgeType::UPGRADE_NOTIFICATION) {
+ if (type == AppMenuIconController::IconType::UPGRADE_NOTIFICATION) {
accname_app = l10n_util::GetStringFUTF16(
IDS_ACCNAME_APP_UPGRADE_RECOMMENDED, accname_app);
}
@@ -672,7 +672,7 @@ void ToolbarView::UpdateBadgeSeverity(AppMenuBadgeController::BadgeType type,
bool was_showing = incompatibility_badge_showing;
incompatibility_badge_showing = false;
- if (type == AppMenuBadgeController::BadgeType::INCOMPATIBILITY_WARNING) {
+ if (type == AppMenuIconController::IconType::INCOMPATIBILITY_WARNING) {
if (!was_showing) {
content::RecordAction(UserMetricsAction("ConflictBadge"));
#if defined(OS_WIN)

Powered by Google App Engine
This is Rietveld 408576698