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

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

Issue 2709903004: Consolidate some more ash tray constants. (Closed)
Patch Set: rebase/review Created 3 years, 9 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/tray/system_tray.cc ('k') | ash/common/system/tray/throbber_view.cc » ('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/system_tray_bubble.h" 5 #include "ash/common/system/tray/system_tray_bubble.h"
6 6
7 #include <utility> 7 #include <utility>
8 #include <vector> 8 #include <vector>
9 9
10 #include "ash/common/material_design/material_design_controller.h" 10 #include "ash/common/material_design/material_design_controller.h"
(...skipping 20 matching lines...) Expand all
31 namespace ash { 31 namespace ash {
32 32
33 namespace { 33 namespace {
34 34
35 // Normally a detailed view is the same size as the default view. However, 35 // Normally a detailed view is the same size as the default view. However,
36 // when showing a detailed view directly (e.g. clicking on a notification), 36 // when showing a detailed view directly (e.g. clicking on a notification),
37 // we may not know the height of the default view, or the default view may 37 // we may not know the height of the default view, or the default view may
38 // be too short, so we use this as a default and minimum height for any 38 // be too short, so we use this as a default and minimum height for any
39 // detailed view. 39 // detailed view.
40 int GetDetailedBubbleMaxHeight() { 40 int GetDetailedBubbleMaxHeight() {
41 return GetTrayConstant(TRAY_POPUP_ITEM_MIN_HEIGHT) * 5; 41 return kTrayPopupItemMinHeight * 5;
42 } 42 }
43 43
44 // Duration of swipe animation used when transitioning from a default to 44 // Duration of swipe animation used when transitioning from a default to
45 // detailed view or vice versa. 45 // detailed view or vice versa.
46 const int kSwipeDelayMS = 150; 46 const int kSwipeDelayMS = 150;
47 47
48 // Extra bottom padding when showing the BUBBLE_TYPE_DEFAULT view. 48 // Extra bottom padding when showing the BUBBLE_TYPE_DEFAULT view.
49 const int kDefaultViewBottomPadding = 4; 49 const int kDefaultViewBottomPadding = 4;
50 50
51 // Implicit animation observer that deletes itself and the layer at the end of 51 // Implicit animation observer that deletes itself and the layer at the end of
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after
369 } 369 }
370 } 370 }
371 371
372 if (focus_view) { 372 if (focus_view) {
373 tray_->ActivateBubble(); 373 tray_->ActivateBubble();
374 focus_view->RequestFocus(); 374 focus_view->RequestFocus();
375 } 375 }
376 } 376 }
377 377
378 } // namespace ash 378 } // namespace ash
OLDNEW
« no previous file with comments | « ash/common/system/tray/system_tray.cc ('k') | ash/common/system/tray/throbber_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698