| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |