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

Side by Side Diff: chrome/browser/ui/toolbar/app_menu_model.cc

Issue 1676623002: Update upgrade app menu icons for MD/vectorization. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: git add 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
« no previous file with comments | « no previous file | chrome/browser/upgrade_detector.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/toolbar/app_menu_model.h" 5 #include "chrome/browser/ui/toolbar/app_menu_model.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after
354 #endif 354 #endif
355 case IDC_UPGRADE_DIALOG: 355 case IDC_UPGRADE_DIALOG:
356 return GetUpgradeDialogMenuItemName(); 356 return GetUpgradeDialogMenuItemName();
357 default: 357 default:
358 NOTREACHED(); 358 NOTREACHED();
359 return base::string16(); 359 return base::string16();
360 } 360 }
361 } 361 }
362 362
363 bool AppMenuModel::GetIconForCommandId(int command_id, gfx::Image* icon) const { 363 bool AppMenuModel::GetIconForCommandId(int command_id, gfx::Image* icon) const {
364 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
365 switch (command_id) { 364 switch (command_id) {
sky 2016/02/08 17:13:17 nit: this is a lot of code just to say: if (comman
Evan Stade 2016/02/08 19:31:12 ha, indeed
366 case IDC_UPGRADE_DIALOG: { 365 case IDC_UPGRADE_DIALOG: {
367 if (UpgradeDetector::GetInstance()->notify_upgrade()) { 366 if (UpgradeDetector::GetInstance()->notify_upgrade()) {
368 *icon = rb.GetNativeImageNamed( 367 *icon = UpgradeDetector::GetInstance()->GetIcon();
369 UpgradeDetector::GetInstance()->GetIconResourceID());
370 return true; 368 return true;
371 } 369 }
372 return false; 370 return false;
373 } 371 }
374 default: 372 default:
375 break; 373 break;
376 } 374 }
377 return false; 375 return false;
378 } 376 }
379 377
(...skipping 563 matching lines...) Expand 10 before | Expand all | Expand 10 after
943 ->GetZoomPercent(); 941 ->GetZoomPercent();
944 } 942 }
945 zoom_label_ = l10n_util::GetStringFUTF16( 943 zoom_label_ = l10n_util::GetStringFUTF16(
946 IDS_ZOOM_PERCENT, base::IntToString16(zoom_percent)); 944 IDS_ZOOM_PERCENT, base::IntToString16(zoom_percent));
947 } 945 }
948 946
949 void AppMenuModel::OnZoomLevelChanged( 947 void AppMenuModel::OnZoomLevelChanged(
950 const content::HostZoomMap::ZoomLevelChange& change) { 948 const content::HostZoomMap::ZoomLevelChange& change) {
951 UpdateZoomControls(); 949 UpdateZoomControls();
952 } 950 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/upgrade_detector.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698