| OLD | NEW |
| 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 "chrome/browser/chromeos/ui/idle_logout_dialog_view.h" | 5 #include "chrome/browser/chromeos/ui/idle_logout_dialog_view.h" |
| 6 | 6 |
| 7 #include "ash/shell.h" | 7 #include "ash/shell.h" |
| 8 #include "base/bind.h" | 8 #include "base/bind.h" |
| 9 #include "base/bind_helpers.h" | 9 #include "base/bind_helpers.h" |
| 10 #include "base/time.h" | 10 #include "base/time.h" |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 } | 86 } |
| 87 | 87 |
| 88 ui::ModalType IdleLogoutDialogView::GetModalType() const { | 88 ui::ModalType IdleLogoutDialogView::GetModalType() const { |
| 89 return ui::MODAL_TYPE_WINDOW; | 89 return ui::MODAL_TYPE_WINDOW; |
| 90 } | 90 } |
| 91 | 91 |
| 92 string16 IdleLogoutDialogView::GetWindowTitle() const { | 92 string16 IdleLogoutDialogView::GetWindowTitle() const { |
| 93 return l10n_util::GetStringUTF16(IDS_IDLE_LOGOUT_TITLE); | 93 return l10n_util::GetStringUTF16(IDS_IDLE_LOGOUT_TITLE); |
| 94 } | 94 } |
| 95 | 95 |
| 96 views::View* IdleLogoutDialogView::GetContentsView() { | |
| 97 return this; | |
| 98 } | |
| 99 | |
| 100 //////////////////////////////////////////////////////////////////////////////// | 96 //////////////////////////////////////////////////////////////////////////////// |
| 101 // IdleLogoutDialog private methods | 97 // IdleLogoutDialog private methods |
| 102 IdleLogoutDialogView::IdleLogoutDialogView() | 98 IdleLogoutDialogView::IdleLogoutDialogView() |
| 103 : restart_label_(NULL), | 99 : restart_label_(NULL), |
| 104 weak_ptr_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)) { | 100 weak_ptr_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)) { |
| 105 if (!IdleLogoutDialogView::provider_) | 101 if (!IdleLogoutDialogView::provider_) |
| 106 IdleLogoutDialogView::provider_ = new IdleLogoutSettingsProvider(); | 102 IdleLogoutDialogView::provider_ = new IdleLogoutSettingsProvider(); |
| 107 } | 103 } |
| 108 | 104 |
| 109 IdleLogoutDialogView::~IdleLogoutDialogView() { | 105 IdleLogoutDialogView::~IdleLogoutDialogView() { |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 206 return g_instance; | 202 return g_instance; |
| 207 } | 203 } |
| 208 | 204 |
| 209 // static | 205 // static |
| 210 void IdleLogoutDialogView::set_settings_provider( | 206 void IdleLogoutDialogView::set_settings_provider( |
| 211 IdleLogoutSettingsProvider* provider) { | 207 IdleLogoutSettingsProvider* provider) { |
| 212 provider_ = provider; | 208 provider_ = provider; |
| 213 } | 209 } |
| 214 | 210 |
| 215 } // namespace chromeos | 211 } // namespace chromeos |
| OLD | NEW |