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 #ifndef ASH_SYSTEM_DATE_DATE_VIEW_H_ | 5 #ifndef ASH_SYSTEM_DATE_DATE_VIEW_H_ |
6 #define ASH_SYSTEM_DATE_DATE_VIEW_H_ | 6 #define ASH_SYSTEM_DATE_DATE_VIEW_H_ |
7 | 7 |
| 8 #include <memory> |
| 9 |
8 #include "ash/ash_export.h" | 10 #include "ash/ash_export.h" |
9 #include "ash/system/date/tray_date.h" | 11 #include "ash/system/date/tray_date.h" |
10 #include "ash/system/tray/actionable_view.h" | 12 #include "ash/system/tray/actionable_view.h" |
11 #include "base/i18n/time_formatting.h" | 13 #include "base/i18n/time_formatting.h" |
12 #include "base/macros.h" | 14 #include "base/macros.h" |
13 #include "base/memory/scoped_ptr.h" | |
14 #include "base/timer/timer.h" | 15 #include "base/timer/timer.h" |
15 #include "ui/views/view.h" | 16 #include "ui/views/view.h" |
16 | 17 |
17 namespace views { | 18 namespace views { |
18 class Label; | 19 class Label; |
19 } | 20 } |
20 | 21 |
21 namespace ash { | 22 namespace ash { |
22 namespace tray { | 23 namespace tray { |
23 | 24 |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 bool PerformAction(const ui::Event& event) override; | 117 bool PerformAction(const ui::Event& event) override; |
117 | 118 |
118 // Overridden from views::View. | 119 // Overridden from views::View. |
119 bool OnMousePressed(const ui::MouseEvent& event) override; | 120 bool OnMousePressed(const ui::MouseEvent& event) override; |
120 | 121 |
121 void SetBorderFromLayout(TrayDate::ClockLayout clock_layout); | 122 void SetBorderFromLayout(TrayDate::ClockLayout clock_layout); |
122 void SetupLabels(); | 123 void SetupLabels(); |
123 void SetupLabel(views::Label* label); | 124 void SetupLabel(views::Label* label); |
124 | 125 |
125 // Label text used for the normal horizontal shelf. | 126 // Label text used for the normal horizontal shelf. |
126 scoped_ptr<views::Label> horizontal_label_; | 127 std::unique_ptr<views::Label> horizontal_label_; |
127 | 128 |
128 // The time label is split into two lines for the vertical shelf. | 129 // The time label is split into two lines for the vertical shelf. |
129 scoped_ptr<views::Label> vertical_label_hours_; | 130 std::unique_ptr<views::Label> vertical_label_hours_; |
130 scoped_ptr<views::Label> vertical_label_minutes_; | 131 std::unique_ptr<views::Label> vertical_label_minutes_; |
131 | 132 |
132 base::HourClockType hour_type_; | 133 base::HourClockType hour_type_; |
133 | 134 |
134 DISALLOW_COPY_AND_ASSIGN(TimeView); | 135 DISALLOW_COPY_AND_ASSIGN(TimeView); |
135 }; | 136 }; |
136 | 137 |
137 } // namespace tray | 138 } // namespace tray |
138 } // namespace ash | 139 } // namespace ash |
139 | 140 |
140 #endif // ASH_SYSTEM_DATE_DATE_VIEW_H_ | 141 #endif // ASH_SYSTEM_DATE_DATE_VIEW_H_ |
OLD | NEW |