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

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: Addressed review comments. 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 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 const int kTrayPopupItemMinHeight[] = {46, 48, 48}; 108 const int kTrayPopupItemMinHeight[] = {46, 48, 48};
109 const int kTrayPopupItemMaxHeight[] = {138, 144, 144}; 109 const int kTrayPopupItemMaxHeight[] = {138, 144, 144};
110 // FixedSizedImageViews use the contained ImageView's width for 0 values. 110 // FixedSizedImageViews use the contained ImageView's width for 0 values.
111 const int kTrayPopupItemMainImageRegionWidth[] = {0, 48, 48}; 111 const int kTrayPopupItemMainImageRegionWidth[] = {0, 48, 48};
112 const int kTrayPopupItemMoreImageSize[] = {25, kMenuIconSize, kMenuIconSize}; 112 const int kTrayPopupItemMoreImageSize[] = {25, kMenuIconSize, kMenuIconSize};
113 const int kTrayPopupItemMoreRegionHorizontalInset[] = {10, 10, 10}; 113 const int kTrayPopupItemMoreRegionHorizontalInset[] = {10, 10, 10};
114 const int kTrayPopupItemLeftInset[] = {0, 4, 4}; 114 const int kTrayPopupItemLeftInset[] = {0, 4, 4};
115 const int kTrayPopupItemRightInset[] = {0, 0, 0}; 115 const int kTrayPopupItemRightInset[] = {0, 0, 0};
116 const int kTrayPopupItemMinStartWidth[] = {46, 48, 48}; 116 const int kTrayPopupItemMinStartWidth[] = {46, 48, 48};
117 const int kTrayPopupItemMinEndWidth[] = {40, 40, 40}; 117 const int kTrayPopupItemMinEndWidth[] = {40, 40, 40};
118 const int kTrayPopupTransitionToDefaultViewDelayMs[] = {0, 80, 100};
119 const int kTrayPopupTransitionToDetailedViewDelayMs[] = {0, 80, 100};
118 const int kVirtualKeyboardButtonSize[] = {39, kTrayItemSize, kTrayItemSize}; 120 const int kVirtualKeyboardButtonSize[] = {39, kTrayItemSize, kTrayItemSize};
119 const int kTrayImeMenuIcon[] = {40, kTrayItemSize, kTrayItemSize}; 121 const int kTrayImeMenuIcon[] = {40, kTrayItemSize, kTrayItemSize};
120 const int kTrayImageItemPadding[] = {1, 3, 3}; 122 const int kTrayImageItemPadding[] = {1, 3, 3};
121 123
122 const int mode = MaterialDesignController::GetMode(); 124 const int mode = MaterialDesignController::GetMode();
123 DCHECK(mode >= MaterialDesignController::NON_MATERIAL && 125 DCHECK(mode >= MaterialDesignController::NON_MATERIAL &&
124 mode <= MaterialDesignController::MATERIAL_EXPERIMENTAL); 126 mode <= MaterialDesignController::MATERIAL_EXPERIMENTAL);
125 127
126 switch (constant) { 128 switch (constant) {
127 case TRAY_ITEM_HEIGHT_LEGACY: 129 case TRAY_ITEM_HEIGHT_LEGACY:
(...skipping 13 matching lines...) Expand all
141 case TRAY_POPUP_ITEM_MORE_REGION_HORIZONTAL_INSET: 143 case TRAY_POPUP_ITEM_MORE_REGION_HORIZONTAL_INSET:
142 return kTrayPopupItemMoreRegionHorizontalInset[mode]; 144 return kTrayPopupItemMoreRegionHorizontalInset[mode];
143 case TRAY_POPUP_ITEM_LEFT_INSET: 145 case TRAY_POPUP_ITEM_LEFT_INSET:
144 return kTrayPopupItemLeftInset[mode]; 146 return kTrayPopupItemLeftInset[mode];
145 case TRAY_POPUP_ITEM_RIGHT_INSET: 147 case TRAY_POPUP_ITEM_RIGHT_INSET:
146 return kTrayPopupItemRightInset[mode]; 148 return kTrayPopupItemRightInset[mode];
147 case TRAY_POPUP_ITEM_MIN_START_WIDTH: 149 case TRAY_POPUP_ITEM_MIN_START_WIDTH:
148 return kTrayPopupItemMinStartWidth[mode]; 150 return kTrayPopupItemMinStartWidth[mode];
149 case TRAY_POPUP_ITEM_MIN_END_WIDTH: 151 case TRAY_POPUP_ITEM_MIN_END_WIDTH:
150 return kTrayPopupItemMinEndWidth[mode]; 152 return kTrayPopupItemMinEndWidth[mode];
153 case TRAY_POPUP_TRANSITION_TO_DEFAULT_DELAY:
154 return kTrayPopupTransitionToDefaultViewDelayMs[mode];
155 case TRAY_POPUP_TRANSITION_TO_DETAILED_DELAY:
156 return kTrayPopupTransitionToDetailedViewDelayMs[mode];
151 case VIRTUAL_KEYBOARD_BUTTON_SIZE: 157 case VIRTUAL_KEYBOARD_BUTTON_SIZE:
152 return kVirtualKeyboardButtonSize[mode]; 158 return kVirtualKeyboardButtonSize[mode];
153 case TRAY_IME_MENU_ICON: 159 case TRAY_IME_MENU_ICON:
154 return kTrayImeMenuIcon[mode]; 160 return kTrayImeMenuIcon[mode];
155 case TRAY_IMAGE_ITEM_PADDING: 161 case TRAY_IMAGE_ITEM_PADDING:
156 return kTrayImageItemPadding[mode]; 162 return kTrayImageItemPadding[mode];
157 } 163 }
158 NOTREACHED(); 164 NOTREACHED();
159 return 0; 165 return 0;
160 } 166 }
161 167
162 } // namespace ash 168 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698