OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 "ui/message_center/views/message_center_view.h" | 5 #include "ui/message_center/views/message_center_view.h" |
6 | 6 |
7 #include <list> | 7 #include <list> |
8 #include <map> | 8 #include <map> |
9 | 9 |
10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
(...skipping 22 matching lines...) Expand all Loading... |
33 #include "ui/views/controls/label.h" | 33 #include "ui/views/controls/label.h" |
34 #include "ui/views/controls/scroll_view.h" | 34 #include "ui/views/controls/scroll_view.h" |
35 #include "ui/views/controls/scrollbar/overlay_scroll_bar.h" | 35 #include "ui/views/controls/scrollbar/overlay_scroll_bar.h" |
36 #include "ui/views/layout/box_layout.h" | 36 #include "ui/views/layout/box_layout.h" |
37 #include "ui/views/widget/widget.h" | 37 #include "ui/views/widget/widget.h" |
38 | 38 |
39 namespace message_center { | 39 namespace message_center { |
40 | 40 |
41 namespace { | 41 namespace { |
42 | 42 |
43 const SkColor kBorderDarkColor = SkColorSetRGB(0xaa, 0xaa, 0xaa); | |
44 const SkColor kButtonTextHighlightColor = SkColorSetRGB(0x2a, 0x2a, 0x2a); | |
45 const SkColor kButtonTextHoverColor = SkColorSetRGB(0x2a, 0x2a, 0x2a); | |
46 const SkColor kNoNotificationsTextColor = SkColorSetRGB(0xb4, 0xb4, 0xb4); | 43 const SkColor kNoNotificationsTextColor = SkColorSetRGB(0xb4, 0xb4, 0xb4); |
| 44 #if defined(OS_LINUX) && defined(OS_CHROMEOS) |
47 const SkColor kTransparentColor = SkColorSetARGB(0, 0, 0, 0); | 45 const SkColor kTransparentColor = SkColorSetARGB(0, 0, 0, 0); |
| 46 #endif |
48 const int kAnimateClearingNextNotificationDelayMS = 40; | 47 const int kAnimateClearingNextNotificationDelayMS = 40; |
49 const int kButtonBarBorderThickness = 1; | |
50 const int kMinScrollViewHeight = 100; | 48 const int kMinScrollViewHeight = 100; |
51 | 49 |
52 static const int kDefaultAnimationDurationMs = 120; | 50 const int kDefaultAnimationDurationMs = 120; |
53 static const int kDefaultFrameRateHz = 60; | 51 const int kDefaultFrameRateHz = 60; |
54 | 52 |
55 } // namespace | 53 } // namespace |
56 | 54 |
57 // BoundedScrollView /////////////////////////////////////////////////////////// | 55 // BoundedScrollView /////////////////////////////////////////////////////////// |
58 | 56 |
59 // A custom scroll view whose height has a minimum and maximum value and whose | 57 // A custom scroll view whose height has a minimum and maximum value and whose |
60 // scroll bar disappears when not needed. | 58 // scroll bar disappears when not needed. |
61 class BoundedScrollView : public views::ScrollView { | 59 class BoundedScrollView : public views::ScrollView { |
62 public: | 60 public: |
63 BoundedScrollView(int min_height, int max_height); | 61 BoundedScrollView(int min_height, int max_height); |
(...skipping 935 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
999 scroller_->InvalidateLayout(); | 997 scroller_->InvalidateLayout(); |
1000 PreferredSizeChanged(); | 998 PreferredSizeChanged(); |
1001 Layout(); | 999 Layout(); |
1002 } | 1000 } |
1003 | 1001 |
1004 void MessageCenterView::SetNotificationViewForTest(views::View* view) { | 1002 void MessageCenterView::SetNotificationViewForTest(views::View* view) { |
1005 message_list_view_->AddNotificationAt(view, 0); | 1003 message_list_view_->AddNotificationAt(view, 0); |
1006 } | 1004 } |
1007 | 1005 |
1008 } // namespace message_center | 1006 } // namespace message_center |
OLD | NEW |