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

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

Issue 2494943005: [ash-md] Added a delay between system menu default/detailed view transitions. (Closed)
Patch Set: Created 4 years, 1 month 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
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" 7 #include "ash/common/material_design/material_design_controller.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "third_party/skia/include/core/SkColor.h" 9 #include "third_party/skia/include/core/SkColor.h"
10 #include "ui/gfx/color_palette.h" 10 #include "ui/gfx/color_palette.h"
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 const int kTrayPaddingFromEdgeOfShelf[] = {3, 4, 4}; 107 const int kTrayPaddingFromEdgeOfShelf[] = {3, 4, 4};
108 const int kTrayPopupItemHeight[] = {46, 48, 48}; 108 const int kTrayPopupItemHeight[] = {46, 48, 48};
109 // FixedSizedImageViews use the contained ImageView's width for 0 values. 109 // FixedSizedImageViews use the contained ImageView's width for 0 values.
110 const int kTrayPopupItemMainImageRegionWidth[] = {0, 48, 48}; 110 const int kTrayPopupItemMainImageRegionWidth[] = {0, 48, 48};
111 const int kTrayPopupItemMoreImageSize[] = {25, kMenuIconSize, kMenuIconSize}; 111 const int kTrayPopupItemMoreImageSize[] = {25, kMenuIconSize, kMenuIconSize};
112 const int kTrayPopupItemMoreRegionHorizontalInset[] = {10, 10, 10}; 112 const int kTrayPopupItemMoreRegionHorizontalInset[] = {10, 10, 10};
113 const int kTrayPopupItemLeftInset[] = {0, 4, 4}; 113 const int kTrayPopupItemLeftInset[] = {0, 4, 4};
114 const int kTrayPopupItemRightInset[] = {0, 0, 0}; 114 const int kTrayPopupItemRightInset[] = {0, 0, 0};
115 const int kTrayPopupItemMinStartWidth[] = {46, 48, 48}; 115 const int kTrayPopupItemMinStartWidth[] = {46, 48, 48};
116 const int kTrayPopupItemMinEndWidth[] = {40, 40, 40}; 116 const int kTrayPopupItemMinEndWidth[] = {40, 40, 40};
117 const int kTrayPopupTransitionToDefaultViewDelayMs[] = {0, 80, 100};
tdanderson 2016/11/13 20:09:02 I'm OK with trying this approach, given that we ha
bruthig 2016/11/13 20:47:51 Acknowledged.
118 const int kTrayPopupTransitionToDetailedViewDelayMs[] = {0, 80, 100};
117 const int kVirtualKeyboardButtonSize[] = {39, kTrayItemSize, kTrayItemSize}; 119 const int kVirtualKeyboardButtonSize[] = {39, kTrayItemSize, kTrayItemSize};
118 const int kTrayImeMenuIcon[] = {40, kTrayItemSize, kTrayItemSize}; 120 const int kTrayImeMenuIcon[] = {40, kTrayItemSize, kTrayItemSize};
119 const int kTrayImageItemPadding[] = {1, 3, 3}; 121 const int kTrayImageItemPadding[] = {1, 3, 3};
120 122
121 const int mode = MaterialDesignController::GetMode(); 123 const int mode = MaterialDesignController::GetMode();
122 DCHECK(mode >= MaterialDesignController::NON_MATERIAL && 124 DCHECK(mode >= MaterialDesignController::NON_MATERIAL &&
123 mode <= MaterialDesignController::MATERIAL_EXPERIMENTAL); 125 mode <= MaterialDesignController::MATERIAL_EXPERIMENTAL);
124 126
125 switch (constant) { 127 switch (constant) {
126 case TRAY_ITEM_HEIGHT_LEGACY: 128 case TRAY_ITEM_HEIGHT_LEGACY:
(...skipping 11 matching lines...) Expand all
138 case TRAY_POPUP_ITEM_MORE_REGION_HORIZONTAL_INSET: 140 case TRAY_POPUP_ITEM_MORE_REGION_HORIZONTAL_INSET:
139 return kTrayPopupItemMoreRegionHorizontalInset[mode]; 141 return kTrayPopupItemMoreRegionHorizontalInset[mode];
140 case TRAY_POPUP_ITEM_LEFT_INSET: 142 case TRAY_POPUP_ITEM_LEFT_INSET:
141 return kTrayPopupItemLeftInset[mode]; 143 return kTrayPopupItemLeftInset[mode];
142 case TRAY_POPUP_ITEM_RIGHT_INSET: 144 case TRAY_POPUP_ITEM_RIGHT_INSET:
143 return kTrayPopupItemRightInset[mode]; 145 return kTrayPopupItemRightInset[mode];
144 case TRAY_POPUP_ITEM_MIN_START_WIDTH: 146 case TRAY_POPUP_ITEM_MIN_START_WIDTH:
145 return kTrayPopupItemMinStartWidth[mode]; 147 return kTrayPopupItemMinStartWidth[mode];
146 case TRAY_POPUP_ITEM_MIN_END_WIDTH: 148 case TRAY_POPUP_ITEM_MIN_END_WIDTH:
147 return kTrayPopupItemMinEndWidth[mode]; 149 return kTrayPopupItemMinEndWidth[mode];
150 case TRAY_POPUP_TRANSITION_TO_DEFAULT_DELAY:
151 return kTrayPopupTransitionToDefaultViewDelayMs[mode];
152 case TRAY_POPUP_TRANSITION_TO_DETAILED_DELAY:
153 return kTrayPopupTransitionToDetailedViewDelayMs[mode];
148 case VIRTUAL_KEYBOARD_BUTTON_SIZE: 154 case VIRTUAL_KEYBOARD_BUTTON_SIZE:
149 return kVirtualKeyboardButtonSize[mode]; 155 return kVirtualKeyboardButtonSize[mode];
150 case TRAY_IME_MENU_ICON: 156 case TRAY_IME_MENU_ICON:
151 return kTrayImeMenuIcon[mode]; 157 return kTrayImeMenuIcon[mode];
152 case TRAY_IMAGE_ITEM_PADDING: 158 case TRAY_IMAGE_ITEM_PADDING:
153 return kTrayImageItemPadding[mode]; 159 return kTrayImageItemPadding[mode];
154 } 160 }
155 NOTREACHED(); 161 NOTREACHED();
156 return 0; 162 return 0;
157 } 163 }
158 164
159 } // namespace ash 165 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698