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

Side by Side Diff: ash/system/date/tray_date.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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ash/system/date/date_view.cc ('k') | ash/system/ime/tray_ime.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/date/tray_date.h" 5 #include "ash/system/date/tray_date.h"
6 6
7 #include "ash/metrics/user_metrics_recorder.h" 7 #include "ash/metrics/user_metrics_recorder.h"
8 #include "ash/session_state_delegate.h" 8 #include "ash/session_state_delegate.h"
9 #include "ash/shell.h" 9 #include "ash/shell.h"
10 #include "ash/shell_delegate.h" 10 #include "ash/shell_delegate.h"
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 public views::ButtonListener { 57 public views::ButtonListener {
58 public: 58 public:
59 explicit DateDefaultView(ash::user::LoginStatus login) 59 explicit DateDefaultView(ash::user::LoginStatus login)
60 : help_(NULL), 60 : help_(NULL),
61 shutdown_(NULL), 61 shutdown_(NULL),
62 lock_(NULL), 62 lock_(NULL),
63 date_view_(NULL) { 63 date_view_(NULL) {
64 SetLayoutManager(new views::FillLayout); 64 SetLayoutManager(new views::FillLayout);
65 65
66 date_view_ = new tray::DateView(); 66 date_view_ = new tray::DateView();
67 date_view_->set_border(views::Border::CreateEmptyBorder(kPaddingVertical, 67 date_view_->SetBorder(views::Border::CreateEmptyBorder(
68 ash::kTrayPopupPaddingHorizontal, 68 kPaddingVertical, ash::kTrayPopupPaddingHorizontal, 0, 0));
69 0,
70 0));
71 SpecialPopupRow* view = new SpecialPopupRow(); 69 SpecialPopupRow* view = new SpecialPopupRow();
72 view->SetContent(date_view_); 70 view->SetContent(date_view_);
73 AddChildView(view); 71 AddChildView(view);
74 72
75 if (login == ash::user::LOGGED_IN_LOCKED || 73 if (login == ash::user::LOGGED_IN_LOCKED ||
76 login == ash::user::LOGGED_IN_NONE) 74 login == ash::user::LOGGED_IN_NONE)
77 return; 75 return;
78 76
79 date_view_->SetActionable(true); 77 date_view_->SetActionable(true);
80 78
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 default_view_->GetDateView()->UpdateTimeFormat(); 229 default_view_->GetDateView()->UpdateTimeFormat();
232 } 230 }
233 231
234 void TrayDate::Refresh() { 232 void TrayDate::Refresh() {
235 if (time_tray_) 233 if (time_tray_)
236 time_tray_->UpdateText(); 234 time_tray_->UpdateText();
237 } 235 }
238 236
239 } // namespace internal 237 } // namespace internal
240 } // namespace ash 238 } // namespace ash
OLDNEW
« no previous file with comments | « ash/system/date/date_view.cc ('k') | ash/system/ime/tray_ime.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698