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

Side by Side Diff: ash/system/logout_button/logout_confirmation_dialog_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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/logout_button/logout_confirmation_dialog_view.h" 5 #include "ash/system/logout_button/logout_confirmation_dialog_view.h"
6 6
7 #include "ash/shell.h" 7 #include "ash/shell.h"
8 #include "ash/system/logout_button/logout_button_tray.h" 8 #include "ash/system/logout_button/logout_button_tray.h"
9 #include "ash/system/tray/system_tray_delegate.h" 9 #include "ash/system/tray/system_tray_delegate.h"
10 #include "ash/system/tray/tray_constants.h" 10 #include "ash/system/tray/tray_constants.h"
(...skipping 19 matching lines...) Expand all
30 inline int Round(double x) { 30 inline int Round(double x) {
31 return static_cast<int>(x + 0.5); 31 return static_cast<int>(x + 0.5);
32 } 32 }
33 33
34 } // namespace 34 } // namespace
35 35
36 LogoutConfirmationDialogView::LogoutConfirmationDialogView( 36 LogoutConfirmationDialogView::LogoutConfirmationDialogView(
37 LogoutButtonTray* owner, Delegate* delegate) : owner_(owner), 37 LogoutButtonTray* owner, Delegate* delegate) : owner_(owner),
38 delegate_(delegate) { 38 delegate_(delegate) {
39 text_label_ = new views::Label; 39 text_label_ = new views::Label;
40 text_label_->set_border( 40 text_label_->SetBorder(views::Border::CreateEmptyBorder(
41 views::Border::CreateEmptyBorder(0, kTrayPopupPaddingHorizontal, 41 0, kTrayPopupPaddingHorizontal, 0, kTrayPopupPaddingHorizontal));
42 0, kTrayPopupPaddingHorizontal));
43 text_label_->SetHorizontalAlignment(gfx::ALIGN_LEFT); 42 text_label_->SetHorizontalAlignment(gfx::ALIGN_LEFT);
44 text_label_->SetMultiLine(true); 43 text_label_->SetMultiLine(true);
45 44
46 SetLayoutManager(new views::FillLayout()); 45 SetLayoutManager(new views::FillLayout());
47 46
48 AddChildView(text_label_); 47 AddChildView(text_label_);
49 } 48 }
50 49
51 LogoutConfirmationDialogView::~LogoutConfirmationDialogView() { 50 LogoutConfirmationDialogView::~LogoutConfirmationDialogView() {
52 } 51 }
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 } else { 128 } else {
130 text_label_->SetText(l10n_util::GetStringUTF16( 129 text_label_->SetText(l10n_util::GetStringUTF16(
131 IDS_ASH_LOGOUT_CONFIRMATION_WARNING_NOW)); 130 IDS_ASH_LOGOUT_CONFIRMATION_WARNING_NOW));
132 timer_.Stop(); 131 timer_.Stop();
133 LogoutCurrentUser(); 132 LogoutCurrentUser();
134 } 133 }
135 } 134 }
136 135
137 } // namespace internal 136 } // namespace internal
138 } // namespace ash 137 } // namespace ash
OLDNEW
« no previous file with comments | « ash/system/logout_button/logout_button_tray.cc ('k') | ash/system/session_length_limit/tray_session_length_limit.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698