| 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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 | 44 |
| 45 namespace message_center { | 45 namespace message_center { |
| 46 | 46 |
| 47 namespace { | 47 namespace { |
| 48 | 48 |
| 49 const SkColor kNoNotificationsTextColor = SkColorSetRGB(0xb4, 0xb4, 0xb4); | 49 const SkColor kNoNotificationsTextColor = SkColorSetRGB(0xb4, 0xb4, 0xb4); |
| 50 #if defined(OS_LINUX) && defined(OS_CHROMEOS) | 50 #if defined(OS_LINUX) && defined(OS_CHROMEOS) |
| 51 const SkColor kTransparentColor = SkColorSetARGB(0, 0, 0, 0); | 51 const SkColor kTransparentColor = SkColorSetARGB(0, 0, 0, 0); |
| 52 #endif | 52 #endif |
| 53 const int kAnimateClearingNextNotificationDelayMS = 40; | 53 const int kAnimateClearingNextNotificationDelayMS = 40; |
| 54 const int kMinScrollViewHeight = 100; | |
| 55 | 54 |
| 56 const int kDefaultAnimationDurationMs = 120; | 55 const int kDefaultAnimationDurationMs = 120; |
| 57 const int kDefaultFrameRateHz = 60; | 56 const int kDefaultFrameRateHz = 60; |
| 58 } // namespace | 57 } // namespace |
| 59 | 58 |
| 60 // BoundedScrollView /////////////////////////////////////////////////////////// | 59 // BoundedScrollView /////////////////////////////////////////////////////////// |
| 61 | 60 |
| 62 // A custom scroll view whose height has a minimum and maximum value and whose | 61 // A custom scroll view whose height has a minimum and maximum value and whose |
| 63 // scroll bar disappears when not needed. | 62 // scroll bar disappears when not needed. |
| 64 class BoundedScrollView : public views::ScrollView { | 63 class BoundedScrollView : public views::ScrollView { |
| (...skipping 1013 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1078 scroller_->InvalidateLayout(); | 1077 scroller_->InvalidateLayout(); |
| 1079 PreferredSizeChanged(); | 1078 PreferredSizeChanged(); |
| 1080 Layout(); | 1079 Layout(); |
| 1081 } | 1080 } |
| 1082 | 1081 |
| 1083 void MessageCenterView::SetNotificationViewForTest(MessageView* view) { | 1082 void MessageCenterView::SetNotificationViewForTest(MessageView* view) { |
| 1084 message_list_view_->AddNotificationAt(view, 0); | 1083 message_list_view_->AddNotificationAt(view, 0); |
| 1085 } | 1084 } |
| 1086 | 1085 |
| 1087 } // namespace message_center | 1086 } // namespace message_center |
| OLD | NEW |