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

Unified Diff: ash/common/system/chromeos/brightness/tray_brightness.cc

Issue 2776973005: Revert of Remove some pre-md code and assets. (Closed)
Patch Set: Created 3 years, 9 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
« no previous file with comments | « ash/BUILD.gn ('k') | ash/common/system/chromeos/power/power_status.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/system/chromeos/brightness/tray_brightness.cc
diff --git a/ash/common/system/chromeos/brightness/tray_brightness.cc b/ash/common/system/chromeos/brightness/tray_brightness.cc
index b526202197cc6f6bbedc48841949ba5004a90137..0240a979debf6645840cff5a79dcc86d00b75db8 100644
--- a/ash/common/system/chromeos/brightness/tray_brightness.cc
+++ b/ash/common/system/chromeos/brightness/tray_brightness.cc
@@ -6,6 +6,7 @@
#include <algorithm>
+#include "ash/common/material_design/material_design_controller.h"
#include "ash/common/shell_observer.h"
#include "ash/common/system/brightness_control_delegate.h"
#include "ash/common/system/tray/tray_constants.h"
@@ -102,8 +103,13 @@
ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
views::ImageView* icon = TrayPopupUtils::CreateMainImageView();
- icon->SetImage(
- gfx::CreateVectorIcon(kSystemMenuBrightnessIcon, kMenuIconColor));
+ if (MaterialDesignController::IsSystemTrayMenuMaterial()) {
+ icon->SetImage(
+ gfx::CreateVectorIcon(kSystemMenuBrightnessIcon, kMenuIconColor));
+ } else {
+ icon->SetImage(
+ rb.GetImageNamed(IDR_AURA_UBER_TRAY_BRIGHTNESS).ToImageSkia());
+ }
tri_view->AddView(TriView::Container::START, icon);
slider_ = TrayPopupUtils::CreateSlider(this);
« no previous file with comments | « ash/BUILD.gn ('k') | ash/common/system/chromeos/power/power_status.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698