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 <map> | 7 #include <map> |
8 | 8 |
9 #include "base/stl_util.h" | 9 #include "base/stl_util.h" |
10 #include "grit/ui_strings.h" | 10 #include "grit/ui_strings.h" |
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
182 set_background(views::Background::CreateSolidBackground( | 182 set_background(views::Background::CreateSolidBackground( |
183 kMessageCenterBackgroundColor)); | 183 kMessageCenterBackgroundColor)); |
184 set_border(views::Border::CreateSolidSidedBorder( | 184 set_border(views::Border::CreateSolidSidedBorder( |
185 1, 0, 0, 0, kFooterDelimiterColor)); | 185 1, 0, 0, 0, kFooterDelimiterColor)); |
186 | 186 |
187 | 187 |
188 notification_label_ = new views::Label(l10n_util::GetStringUTF16( | 188 notification_label_ = new views::Label(l10n_util::GetStringUTF16( |
189 IDS_MESSAGE_CENTER_FOOTER_TITLE)); | 189 IDS_MESSAGE_CENTER_FOOTER_TITLE)); |
190 notification_label_->SetAutoColorReadabilityEnabled(false); | 190 notification_label_->SetAutoColorReadabilityEnabled(false); |
191 notification_label_->SetHorizontalAlignment(gfx::ALIGN_LEFT); | 191 notification_label_->SetHorizontalAlignment(gfx::ALIGN_LEFT); |
192 notification_label_->SetElideBehavior(views::Label::ELIDE_AT_END); | |
193 notification_label_->SetEnabledColor(kFooterTextColor); | 192 notification_label_->SetEnabledColor(kFooterTextColor); |
194 AddChildView(notification_label_); | 193 AddChildView(notification_label_); |
195 settings_button_ = new NotificationCenterButton( | 194 settings_button_ = new NotificationCenterButton( |
196 this, l10n_util::GetStringUTF16( | 195 this, l10n_util::GetStringUTF16( |
197 IDS_MESSAGE_CENTER_SETTINGS_BUTTON_LABEL)); | 196 IDS_MESSAGE_CENTER_SETTINGS_BUTTON_LABEL)); |
198 settings_button_->set_focusable(true); | 197 settings_button_->set_focusable(true); |
199 settings_button_->set_request_focus_on_press(false); | 198 settings_button_->set_request_focus_on_press(false); |
200 AddChildView(settings_button_); | 199 AddChildView(settings_button_); |
201 NotificationCenterButton* close_all_button = new NotificationCenterButton( | 200 NotificationCenterButton* close_all_button = new NotificationCenterButton( |
202 this, l10n_util::GetStringUTF16(IDS_MESSAGE_CENTER_CLEAR_ALL)); | 201 this, l10n_util::GetStringUTF16(IDS_MESSAGE_CENTER_CLEAR_ALL)); |
(...skipping 668 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
871 PreferredSizeChanged(); | 870 PreferredSizeChanged(); |
872 Layout(); | 871 Layout(); |
873 } | 872 } |
874 | 873 |
875 void MessageCenterView::SetNotificationViewForTest(views::View* view) { | 874 void MessageCenterView::SetNotificationViewForTest(views::View* view) { |
876 message_list_view_->RemoveAllChildViews(true); | 875 message_list_view_->RemoveAllChildViews(true); |
877 message_list_view_->AddNotificationAt(view, 0); | 876 message_list_view_->AddNotificationAt(view, 0); |
878 } | 877 } |
879 | 878 |
880 } // namespace message_center | 879 } // namespace message_center |
OLD | NEW |