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

Unified Diff: ash/system/date/date_view.cc

Issue 145033006: views: Make View::set_border() take a scoped_ptr<>. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase to ToT Created 6 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/system/date/date_view.h ('k') | ash/system/date/tray_date.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/system/date/date_view.cc
diff --git a/ash/system/date/date_view.cc b/ash/system/date/date_view.cc
index b336477f67b0366a5049be8e492f5d8ca3c182c8..7caae7116e26a81a493a36db96630535522a7802 100644
--- a/ash/system/date/date_view.cc
+++ b/ash/system/date/date_view.cc
@@ -248,7 +248,7 @@ bool TimeView::OnMousePressed(const ui::MouseEvent& event) {
}
void TimeView::UpdateClockLayout(TrayDate::ClockLayout clock_layout){
- SetBorder(clock_layout);
+ SetBorderFromLayout(clock_layout);
if (clock_layout == TrayDate::HORIZONTAL_CLOCK) {
RemoveChildView(vertical_label_hours_.get());
RemoveChildView(vertical_label_minutes_.get());
@@ -274,13 +274,15 @@ void TimeView::UpdateClockLayout(TrayDate::ClockLayout clock_layout){
Layout();
}
-void TimeView::SetBorder(TrayDate::ClockLayout clock_layout) {
+void TimeView::SetBorderFromLayout(TrayDate::ClockLayout clock_layout) {
if (clock_layout == TrayDate::HORIZONTAL_CLOCK)
- set_border(views::Border::CreateEmptyBorder(
- 0, kTrayLabelItemHorizontalPaddingBottomAlignment,
- 0, kTrayLabelItemHorizontalPaddingBottomAlignment));
+ SetBorder(views::Border::CreateEmptyBorder(
+ 0,
+ kTrayLabelItemHorizontalPaddingBottomAlignment,
+ 0,
+ kTrayLabelItemHorizontalPaddingBottomAlignment));
else
- set_border(NULL);
+ SetBorder(views::Border::NullBorder());
}
void TimeView::SetupLabels() {
@@ -292,9 +294,8 @@ void TimeView::SetupLabels() {
SetupLabel(vertical_label_minutes_.get());
vertical_label_minutes_->SetEnabledColor(kVerticalClockMinuteColor);
// Pull the minutes up closer to the hours by using a negative top border.
- vertical_label_minutes_->set_border(
- views::Border::CreateEmptyBorder(
- kVerticalClockMinutesTopOffset, 0, 0, 0));
+ vertical_label_minutes_->SetBorder(views::Border::CreateEmptyBorder(
+ kVerticalClockMinutesTopOffset, 0, 0, 0));
}
void TimeView::SetupLabel(views::Label* label) {
« no previous file with comments | « ash/system/date/date_view.h ('k') | ash/system/date/tray_date.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698