| OLD | NEW |
| 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 "ash/common/shelf/shelf_constants.h" | 5 #include "ash/common/shelf/shelf_constants.h" |
| 6 | 6 |
| 7 #include "ash/common/material_design/material_design_controller.h" | 7 #include "ash/common/material_design/material_design_controller.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 | 9 |
| 10 namespace ash { | 10 namespace ash { |
| 11 | 11 |
| 12 const int kInvalidImageResourceID = -1; | 12 const int kInvalidImageResourceID = -1; |
| 13 const int kShelfSize = 47; | 13 const int kShelfSize = 47; |
| 14 const int kShelfButtonSpacing = 10; | 14 const int kShelfButtonSpacing = 10; |
| 15 const int kShelfButtonSize = 44; | 15 const int kShelfButtonSize = 44; |
| 16 const int kTimeToSwitchBackgroundMs = 1000; | 16 const int kTimeToSwitchBackgroundMs = 1000; |
| 17 const SkColor kShelfBaseColor = SK_ColorBLACK; | 17 const SkColor kShelfBaseColor = SK_ColorBLACK; |
| 18 const SkColor kShelfIconColor = SK_ColorWHITE; |
| 18 | 19 |
| 19 int GetShelfConstant(ShelfConstant shelf_constant) { | 20 int GetShelfConstant(ShelfConstant shelf_constant) { |
| 20 const int kShelfBackgroundAlpha[] = {204, 153, 153}; | 21 const int kShelfBackgroundAlpha[] = {204, 153, 153}; |
| 21 | 22 |
| 22 const int mode = MaterialDesignController::GetMode(); | 23 const int mode = MaterialDesignController::GetMode(); |
| 23 DCHECK(mode >= MaterialDesignController::NON_MATERIAL && | 24 DCHECK(mode >= MaterialDesignController::NON_MATERIAL && |
| 24 mode <= MaterialDesignController::MATERIAL_EXPERIMENTAL); | 25 mode <= MaterialDesignController::MATERIAL_EXPERIMENTAL); |
| 25 | 26 |
| 26 switch (shelf_constant) { | 27 switch (shelf_constant) { |
| 27 case SHELF_BACKGROUND_ALPHA: | 28 case SHELF_BACKGROUND_ALPHA: |
| 28 return kShelfBackgroundAlpha[mode]; | 29 return kShelfBackgroundAlpha[mode]; |
| 29 } | 30 } |
| 30 NOTREACHED(); | 31 NOTREACHED(); |
| 31 return 0; | 32 return 0; |
| 32 } | 33 } |
| 33 | 34 |
| 34 } // namespace ash | 35 } // namespace ash |
| OLD | NEW |