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 "ash/system/chromeos/label_tray_view.h" | 5 #include "ash/system/chromeos/label_tray_view.h" |
6 | 6 |
7 #include "ash/system/tray/hover_highlight_view.h" | 7 #include "ash/system/tray/hover_highlight_view.h" |
8 #include "ash/system/tray/tray_constants.h" | 8 #include "ash/system/tray/tray_constants.h" |
9 #include "ash/system/tray/view_click_listener.h" | 9 #include "ash/system/tray/view_click_listener.h" |
10 #include "ui/base/resource/resource_bundle.h" | 10 #include "ui/base/resource/resource_bundle.h" |
11 #include "ui/gfx/font.h" | 11 #include "ui/gfx/font.h" |
12 #include "ui/views/border.h" | 12 #include "ui/views/border.h" |
13 #include "ui/views/controls/label.h" | 13 #include "ui/views/controls/label.h" |
14 #include "ui/views/layout/fill_layout.h" | 14 #include "ui/views/layout/fill_layout.h" |
15 | 15 |
16 namespace ash { | 16 namespace ash { |
17 namespace internal { | |
18 | 17 |
19 LabelTrayView::LabelTrayView(ViewClickListener* click_listener, | 18 LabelTrayView::LabelTrayView(ViewClickListener* click_listener, |
20 int icon_resource_id) | 19 int icon_resource_id) |
21 : click_listener_(click_listener), | 20 : click_listener_(click_listener), |
22 icon_resource_id_(icon_resource_id) { | 21 icon_resource_id_(icon_resource_id) { |
23 SetLayoutManager(new views::FillLayout()); | 22 SetLayoutManager(new views::FillLayout()); |
24 SetVisible(false); | 23 SetVisible(false); |
25 } | 24 } |
26 | 25 |
27 LabelTrayView::~LabelTrayView() { | 26 LabelTrayView::~LabelTrayView() { |
(...skipping 29 matching lines...) Expand all Loading... |
57 child->text_label()->SetMultiLine(true); | 56 child->text_label()->SetMultiLine(true); |
58 child->text_label()->SizeToFit(kTrayNotificationContentsWidth + | 57 child->text_label()->SizeToFit(kTrayNotificationContentsWidth + |
59 kNotificationIconWidth); | 58 kNotificationIconWidth); |
60 } | 59 } |
61 child->text_label()->SetAllowCharacterBreak(true); | 60 child->text_label()->SetAllowCharacterBreak(true); |
62 child->SetExpandable(true); | 61 child->SetExpandable(true); |
63 child->SetVisible(true); | 62 child->SetVisible(true); |
64 return child; | 63 return child; |
65 } | 64 } |
66 | 65 |
67 } // namespace internal | |
68 } // namespace ash | 66 } // namespace ash |
OLD | NEW |