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

Side by Side Diff: ash/common/system/tray/tray_constants.cc

Issue 2692663002: Gut ash::MaterialDesignController, and remove the about:flags entry. (Closed)
Patch Set: yet another rebase Created 3 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 | « ash/common/system/date/system_info_default_view_unittest.cc ('k') | ash/common/test/BUILD.gn » ('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 "ash/common/system/tray/tray_constants.h" 5 #include "ash/common/system/tray/tray_constants.h"
6 6
7 #include "ash/common/material_design/material_design_controller.h"
8 #include "base/logging.h" 7 #include "base/logging.h"
9 #include "third_party/skia/include/core/SkColor.h" 8 #include "third_party/skia/include/core/SkColor.h"
10 #include "ui/gfx/color_palette.h" 9 #include "ui/gfx/color_palette.h"
11 10
12 namespace ash { 11 namespace ash {
13 12
14 const int kPaddingFromRightEdgeOfScreenBottomAlignment = 7; 13 const int kPaddingFromRightEdgeOfScreenBottomAlignment = 7;
15 const int kPaddingFromBottomOfScreenBottomAlignment = 7; 14 const int kPaddingFromBottomOfScreenBottomAlignment = 7;
16 const int kPaddingFromOuterEdgeOfLauncherVerticalAlignment = 8; 15 const int kPaddingFromOuterEdgeOfLauncherVerticalAlignment = 8;
17 const int kPaddingFromInnerEdgeOfLauncherVerticalAlignment = 9; 16 const int kPaddingFromInnerEdgeOfLauncherVerticalAlignment = 9;
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 const int kTrayPopupItemLeftInset[] = {0, 4, 4}; 119 const int kTrayPopupItemLeftInset[] = {0, 4, 4};
121 const int kTrayPopupItemRightInset[] = {0, 0, 0}; 120 const int kTrayPopupItemRightInset[] = {0, 0, 0};
122 const int kTrayPopupItemMinStartWidth[] = {46, 48, 48}; 121 const int kTrayPopupItemMinStartWidth[] = {46, 48, 48};
123 const int kTrayPopupItemMinEndWidth[] = {40, 40, 40}; 122 const int kTrayPopupItemMinEndWidth[] = {40, 40, 40};
124 const int kTrayPopupTransitionToDefaultViewDelayMs[] = {0, 100, 100}; 123 const int kTrayPopupTransitionToDefaultViewDelayMs[] = {0, 100, 100};
125 const int kTrayPopupTransitionToDetailedViewDelayMs[] = {0, 100, 100}; 124 const int kTrayPopupTransitionToDetailedViewDelayMs[] = {0, 100, 100};
126 const int kVirtualKeyboardButtonSize[] = {39, kTrayItemSize, kTrayItemSize}; 125 const int kVirtualKeyboardButtonSize[] = {39, kTrayItemSize, kTrayItemSize};
127 const int kTrayImeMenuIcon[] = {40, kTrayItemSize, kTrayItemSize}; 126 const int kTrayImeMenuIcon[] = {40, kTrayItemSize, kTrayItemSize};
128 const int kTrayImageItemPadding[] = {1, 3, 3}; 127 const int kTrayImageItemPadding[] = {1, 3, 3};
129 128
130 const int mode = MaterialDesignController::GetMode(); 129 // TODO(estade): clean this up --- remove unneeded constants and reduce
131 DCHECK(mode >= MaterialDesignController::NON_MATERIAL && 130 // remaining arrays to a single constant.
132 mode <= MaterialDesignController::MATERIAL_EXPERIMENTAL); 131 const int mode = 1;
133
134 switch (constant) { 132 switch (constant) {
135 case TRAY_ITEM_HEIGHT_LEGACY: 133 case TRAY_ITEM_HEIGHT_LEGACY:
136 return kTrayItemHeightLegacy[mode]; 134 return kTrayItemHeightLegacy[mode];
137 case TRAY_SPACING: 135 case TRAY_SPACING:
138 return kTraySpacing[mode]; 136 return kTraySpacing[mode];
139 case TRAY_PADDING_FROM_EDGE_OF_SHELF: 137 case TRAY_PADDING_FROM_EDGE_OF_SHELF:
140 return kTrayPaddingFromEdgeOfShelf[mode]; 138 return kTrayPaddingFromEdgeOfShelf[mode];
141 case TRAY_POPUP_ITEM_MIN_HEIGHT: 139 case TRAY_POPUP_ITEM_MIN_HEIGHT:
142 return kTrayPopupItemMinHeight[mode]; 140 return kTrayPopupItemMinHeight[mode];
143 case TRAY_POPUP_ITEM_MAX_HEIGHT: 141 case TRAY_POPUP_ITEM_MAX_HEIGHT:
(...skipping 21 matching lines...) Expand all
165 case TRAY_IME_MENU_ICON: 163 case TRAY_IME_MENU_ICON:
166 return kTrayImeMenuIcon[mode]; 164 return kTrayImeMenuIcon[mode];
167 case TRAY_IMAGE_ITEM_PADDING: 165 case TRAY_IMAGE_ITEM_PADDING:
168 return kTrayImageItemPadding[mode]; 166 return kTrayImageItemPadding[mode];
169 } 167 }
170 NOTREACHED(); 168 NOTREACHED();
171 return 0; 169 return 0;
172 } 170 }
173 171
174 } // namespace ash 172 } // namespace ash
OLDNEW
« no previous file with comments | « ash/common/system/date/system_info_default_view_unittest.cc ('k') | ash/common/test/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698