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

Side by Side Diff: ui/message_center/views/message_center_view.cc

Issue 142413005: Add an empty message to the notification center. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Adds one more nit fix. Created 6 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « ui/message_center/message_center_style.h ('k') | no next file » | 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) 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
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
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
OLDNEW
« no previous file with comments | « ui/message_center/message_center_style.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698