OLD | NEW |
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 "ui/message_center/views/notification_view.h" | 5 #include "ui/message_center/views/notification_view.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/strings/string_util.h" | 8 #include "base/strings/string_util.h" |
9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
10 #include "grit/ui_resources.h" | 10 #include "grit/ui_resources.h" |
(...skipping 12 matching lines...) Expand all Loading... |
23 #include "ui/message_center/views/bounded_label.h" | 23 #include "ui/message_center/views/bounded_label.h" |
24 #include "ui/native_theme/native_theme.h" | 24 #include "ui/native_theme/native_theme.h" |
25 #include "ui/views/controls/button/image_button.h" | 25 #include "ui/views/controls/button/image_button.h" |
26 #include "ui/views/controls/image_view.h" | 26 #include "ui/views/controls/image_view.h" |
27 #include "ui/views/controls/label.h" | 27 #include "ui/views/controls/label.h" |
28 #include "ui/views/controls/progress_bar.h" | 28 #include "ui/views/controls/progress_bar.h" |
29 #include "ui/views/layout/box_layout.h" | 29 #include "ui/views/layout/box_layout.h" |
30 #include "ui/views/layout/fill_layout.h" | 30 #include "ui/views/layout/fill_layout.h" |
31 #include "ui/views/widget/widget.h" | 31 #include "ui/views/widget/widget.h" |
32 | 32 |
| 33 #if defined(USE_AURA) |
| 34 #include "ui/base/cursor/cursor.h" |
| 35 #endif |
| 36 |
33 namespace { | 37 namespace { |
34 | 38 |
35 // Dimensions. | 39 // Dimensions. |
36 const int kIconSize = message_center::kNotificationIconSize; | 40 const int kIconSize = message_center::kNotificationIconSize; |
37 const int kLegacyIconSize = 40; | 41 const int kLegacyIconSize = 40; |
38 const int kTextLeftPadding = kIconSize + message_center::kIconToTextPadding; | 42 const int kTextLeftPadding = kIconSize + message_center::kIconToTextPadding; |
39 const int kTextBottomPadding = 12; | 43 const int kTextBottomPadding = 12; |
40 const int kTextRightPadding = 23; | 44 const int kTextRightPadding = 23; |
41 const int kItemTitleToMessagePadding = 3; | 45 const int kItemTitleToMessagePadding = 3; |
42 const int kProgressBarWidth = message_center::kNotificationWidth - | 46 const int kProgressBarWidth = message_center::kNotificationWidth - |
(...skipping 740 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
783 return message_view_ ? | 787 return message_view_ ? |
784 message_view_->GetLinesForWidthAndLimit(width, limit) : 0; | 788 message_view_->GetLinesForWidthAndLimit(width, limit) : 0; |
785 } | 789 } |
786 | 790 |
787 int NotificationView::GetMessageHeight(int width, int limit) { | 791 int NotificationView::GetMessageHeight(int width, int limit) { |
788 return message_view_ ? | 792 return message_view_ ? |
789 message_view_->GetSizeForWidthAndLines(width, limit).height() : 0; | 793 message_view_->GetSizeForWidthAndLines(width, limit).height() : 0; |
790 } | 794 } |
791 | 795 |
792 } // namespace message_center | 796 } // namespace message_center |
OLD | NEW |