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

Side by Side Diff: chrome/browser/chromeos/kiosk_mode/kiosk_mode_idle_logout.cc

Issue 9665031: Change the idle logout dialog over to use views. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: yacf. Created 8 years, 9 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 (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/kiosk_mode/kiosk_mode_idle_logout.h" 5 #include "chrome/browser/chromeos/kiosk_mode/kiosk_mode_idle_logout.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/lazy_instance.h" 8 #include "base/lazy_instance.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
11 #include "chrome/browser/chromeos/dbus/dbus_thread_manager.h" 11 #include "chrome/browser/chromeos/dbus/dbus_thread_manager.h"
12 #include "chrome/browser/chromeos/kiosk_mode/kiosk_mode_helper.h" 12 #include "chrome/browser/chromeos/kiosk_mode/kiosk_mode_helper.h"
13 #include "chrome/browser/chromeos/dbus/power_manager_client.h" 13 #include "chrome/browser/chromeos/dbus/power_manager_client.h"
14 #include "chrome/browser/ui/webui/chromeos/idle_logout_dialog.h" 14 #include "chrome/browser/chromeos/ui/idle_logout_dialog_view.h"
15 #include "chrome/common/chrome_notification_types.h" 15 #include "chrome/common/chrome_notification_types.h"
16 #include "content/public/browser/notification_observer.h" 16 #include "content/public/browser/notification_observer.h"
17 #include "content/public/browser/notification_registrar.h" 17 #include "content/public/browser/notification_registrar.h"
18 #include "content/public/browser/notification_service.h" 18 #include "content/public/browser/notification_service.h"
19 19
20 namespace { 20 namespace {
21 21
22 const int64 kLoginIdleTimeout = 100; // seconds 22 const int64 kLoginIdleTimeout = 100; // seconds
23 23
24 } // namespace 24 } // namespace
25 25
26 namespace browser { 26 namespace browser {
27 27
28 void ShowIdleLogoutDialog() { 28 void ShowIdleLogoutDialog() {
29 IdleLogoutDialog::ShowIdleLogoutDialog(); 29 IdleLogoutDialogView::ShowDialog();
30 } 30 }
31 31
32 void CloseIdleLogoutDialog() { 32 void CloseIdleLogoutDialog() {
33 IdleLogoutDialog::CloseIdleLogoutDialog(); 33 IdleLogoutDialogView::CloseDialog();
34 } 34 }
35 35
36 } // namespace browser 36 } // namespace browser
37 37
38 namespace chromeos { 38 namespace chromeos {
39 39
40 KioskModeIdleLogout::KioskModeIdleLogout() { 40 KioskModeIdleLogout::KioskModeIdleLogout() {
41 if (chromeos::KioskModeHelper::Get()->is_initialized()) 41 if (chromeos::KioskModeHelper::Get()->is_initialized())
42 Setup(); 42 Setup();
43 else 43 else
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 } 90 }
91 91
92 static base::LazyInstance<KioskModeIdleLogout> 92 static base::LazyInstance<KioskModeIdleLogout>
93 g_kiosk_mode_idle_logout = LAZY_INSTANCE_INITIALIZER; 93 g_kiosk_mode_idle_logout = LAZY_INSTANCE_INITIALIZER;
94 94
95 void InitializeKioskModeIdleLogout() { 95 void InitializeKioskModeIdleLogout() {
96 g_kiosk_mode_idle_logout.Get(); 96 g_kiosk_mode_idle_logout.Get();
97 } 97 }
98 98
99 } // namespace chromeos 99 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/kiosk_mode/kiosk_mode_helper.cc ('k') | chrome/browser/chromeos/ui/idle_logout_dialog_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698