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

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: Further renaming 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
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..f42e9d02f38de197546e414c93ab33681d5a8690 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,13 @@ 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(
+ SetBorder(views::Border::CreateEmptyBorder(
0, kTrayLabelItemHorizontalPaddingBottomAlignment,
0, kTrayLabelItemHorizontalPaddingBottomAlignment));
else
- set_border(NULL);
+ ClearBorder();
}
void TimeView::SetupLabels() {
@@ -292,7 +292,7 @@ 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(
+ vertical_label_minutes_->SetBorder(
views::Border::CreateEmptyBorder(
kVerticalClockMinutesTopOffset, 0, 0, 0));
}

Powered by Google App Engine
This is Rietveld 408576698