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

Unified Diff: ash/common/system/tray/tray_background_view.cc

Issue 2550413004: Remove Ash shelf dimmer. (Closed)
Patch Set: jamescook review Created 4 years 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/common/shelf/wm_shelf.cc ('k') | ash/resources/ash_resources.grd » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/system/tray/tray_background_view.cc
diff --git a/ash/common/system/tray/tray_background_view.cc b/ash/common/system/tray/tray_background_view.cc
index 0b4f6bc96e661ad17a63dea2744b13678e74eb54..76ea1d2699399a687bff7d30aa89f89d282dd012 100644
--- a/ash/common/system/tray/tray_background_view.cc
+++ b/ash/common/system/tray/tray_background_view.cc
@@ -114,15 +114,6 @@ class TrayBackgroundView::TrayWidgetObserver : public views::WidgetObserver {
class TrayBackground : public views::Background {
public:
- const static int kImageTypeDefault = 0;
- const static int kImageTypeOnBlack = 1;
- const static int kImageTypePressed = 2;
- const static int kNumStates = 3;
-
- const static int kImageHorizontal = 0;
- const static int kImageVertical = 1;
- const static int kNumOrientations = 2;
-
TrayBackground(TrayBackgroundView* tray_background_view, bool draws_active)
: tray_background_view_(tray_background_view),
draws_active_(draws_active),
@@ -154,7 +145,19 @@ class TrayBackground : public views::Background {
}
void PaintNonMaterial(gfx::Canvas* canvas, views::View* view) const {
+ const static int kImageTypeDefault = 0;
+ // TODO(estade): leftover type which should be removed along with the rest
+ // of pre-MD code.
+ // const static int kImageTypeOnBlack = 1;
+ const static int kImageTypePressed = 2;
+ const static int kNumStates = 3;
+
+ const static int kImageHorizontal = 0;
+ const static int kImageVertical = 1;
+ const static int kNumOrientations = 2;
+
const int kGridSizeForPainter = 9;
+
const int kImages[kNumOrientations][kNumStates][kGridSizeForPainter] = {
{
// Horizontal
@@ -177,8 +180,6 @@ class TrayBackground : public views::Background {
int state = kImageTypeDefault;
if (draws_active_ && tray_background_view_->is_active())
state = kImageTypePressed;
- else if (shelf->IsDimmed())
- state = kImageTypeOnBlack;
else
state = kImageTypeDefault;
« no previous file with comments | « ash/common/shelf/wm_shelf.cc ('k') | ash/resources/ash_resources.grd » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698