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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 | 44 |
45 base::TimeDelta IdleLogoutSettingsProvider::GetCountdownUpdateInterval() { | 45 base::TimeDelta IdleLogoutSettingsProvider::GetCountdownUpdateInterval() { |
46 return base::TimeDelta::FromMilliseconds(kCountdownUpdateIntervalMs); | 46 return base::TimeDelta::FromMilliseconds(kCountdownUpdateIntervalMs); |
47 } | 47 } |
48 | 48 |
49 KioskModeSettings* IdleLogoutSettingsProvider::GetKioskModeSettings() { | 49 KioskModeSettings* IdleLogoutSettingsProvider::GetKioskModeSettings() { |
50 return KioskModeSettings::Get(); | 50 return KioskModeSettings::Get(); |
51 } | 51 } |
52 | 52 |
53 void IdleLogoutSettingsProvider::LogoutCurrentUser(IdleLogoutDialogView*) { | 53 void IdleLogoutSettingsProvider::LogoutCurrentUser(IdleLogoutDialogView*) { |
54 BrowserList::ExitCleanly(); | 54 BrowserList::AttemptUserExit(); |
55 } | 55 } |
56 | 56 |
57 //////////////////////////////////////////////////////////////////////////////// | 57 //////////////////////////////////////////////////////////////////////////////// |
58 // IdleLogoutDialogView public static methods | 58 // IdleLogoutDialogView public static methods |
59 // static | 59 // static |
60 void IdleLogoutDialogView::ShowDialog() { | 60 void IdleLogoutDialogView::ShowDialog() { |
61 // We only show the dialog if it is not already showing. We don't want two | 61 // We only show the dialog if it is not already showing. We don't want two |
62 // countdowns on the screen for any reason. If the dialog is closed by using | 62 // countdowns on the screen for any reason. If the dialog is closed by using |
63 // CloseDialog, we reset g_instance so the next Show will work correctly; in | 63 // CloseDialog, we reset g_instance so the next Show will work correctly; in |
64 // case the dialog is closed by the system, DeleteDelegate is guaranteed to be | 64 // case the dialog is closed by the system, DeleteDelegate is guaranteed to be |
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
226 return g_instance; | 226 return g_instance; |
227 } | 227 } |
228 | 228 |
229 // static | 229 // static |
230 void IdleLogoutDialogView::set_settings_provider( | 230 void IdleLogoutDialogView::set_settings_provider( |
231 IdleLogoutSettingsProvider* provider) { | 231 IdleLogoutSettingsProvider* provider) { |
232 provider_ = provider; | 232 provider_ = provider; |
233 } | 233 } |
234 | 234 |
235 } // namespace chromeos | 235 } // namespace chromeos |
OLD | NEW |