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 "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
9 #include "base/time.h" | 9 #include "base/time.h" |
10 #include "base/string_number_conversions.h" | 10 #include "base/string_number_conversions.h" |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 | 43 |
44 base::TimeDelta IdleLogoutSettingsProvider::GetCountdownUpdateInterval() { | 44 base::TimeDelta IdleLogoutSettingsProvider::GetCountdownUpdateInterval() { |
45 return base::TimeDelta::FromMilliseconds(kCountdownUpdateIntervalMs); | 45 return base::TimeDelta::FromMilliseconds(kCountdownUpdateIntervalMs); |
46 } | 46 } |
47 | 47 |
48 KioskModeSettings* IdleLogoutSettingsProvider::GetKioskModeSettings() { | 48 KioskModeSettings* IdleLogoutSettingsProvider::GetKioskModeSettings() { |
49 return KioskModeSettings::Get(); | 49 return KioskModeSettings::Get(); |
50 } | 50 } |
51 | 51 |
52 void IdleLogoutSettingsProvider::LogoutCurrentUser(IdleLogoutDialogView*) { | 52 void IdleLogoutSettingsProvider::LogoutCurrentUser(IdleLogoutDialogView*) { |
53 BrowserList::AttemptUserExit(); | 53 BrowserList::ExitCleanly(); |
54 } | 54 } |
55 | 55 |
56 //////////////////////////////////////////////////////////////////////////////// | 56 //////////////////////////////////////////////////////////////////////////////// |
57 // IdleLogoutDialogView public static methods | 57 // IdleLogoutDialogView public static methods |
58 // static | 58 // static |
59 void IdleLogoutDialogView::ShowDialog() { | 59 void IdleLogoutDialogView::ShowDialog() { |
60 // We only show the dialog if it is not already showing. We don't want two | 60 // We only show the dialog if it is not already showing. We don't want two |
61 // countdowns on the screen for any reason. If the dialog is closed by using | 61 // countdowns on the screen for any reason. If the dialog is closed by using |
62 // CloseDialog, we reset g_instance so the next Show will work correctly; in | 62 // CloseDialog, we reset g_instance so the next Show will work correctly; in |
63 // case the dialog is closed by the system, DeleteDelegate is guaranteed to be | 63 // case the dialog is closed by the system, DeleteDelegate is guaranteed to be |
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
218 return g_instance; | 218 return g_instance; |
219 } | 219 } |
220 | 220 |
221 // static | 221 // static |
222 void IdleLogoutDialogView::set_settings_provider( | 222 void IdleLogoutDialogView::set_settings_provider( |
223 IdleLogoutSettingsProvider* provider) { | 223 IdleLogoutSettingsProvider* provider) { |
224 provider_ = provider; | 224 provider_ = provider; |
225 } | 225 } |
226 | 226 |
227 } // namespace chromeos | 227 } // namespace chromeos |
OLD | NEW |