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

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

Issue 13878010: Merge WebUILoginDisplayHost into LoginDisplayHostImpl (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge + move method definition Created 7 years, 8 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_screensaver.h" 5 #include "chrome/browser/chromeos/kiosk_mode/kiosk_mode_screensaver.h"
6 6
7 #include "ash/screensaver/screensaver_view.h" 7 #include "ash/screensaver/screensaver_view.h"
8 #include "ash/shell.h" 8 #include "ash/shell.h"
9 #include "ash/wm/user_activity_detector.h" 9 #include "ash/wm/user_activity_detector.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
11 #include "base/callback.h" 11 #include "base/callback.h"
12 #include "base/lazy_instance.h" 12 #include "base/lazy_instance.h"
13 #include "base/logging.h" 13 #include "base/logging.h"
14 #include "chrome/browser/browser_process.h" 14 #include "chrome/browser/browser_process.h"
15 #include "chrome/browser/chromeos/kiosk_mode/kiosk_mode_settings.h" 15 #include "chrome/browser/chromeos/kiosk_mode/kiosk_mode_settings.h"
16 #include "chrome/browser/chromeos/login/existing_user_controller.h" 16 #include "chrome/browser/chromeos/login/existing_user_controller.h"
17 #include "chrome/browser/chromeos/login/webui_login_display_host.h" 17 #include "chrome/browser/chromeos/login/login_display_host_impl.h"
18 #include "chrome/browser/chromeos/policy/app_pack_updater.h" 18 #include "chrome/browser/chromeos/policy/app_pack_updater.h"
19 #include "chrome/browser/extensions/extension_service.h" 19 #include "chrome/browser/extensions/extension_service.h"
20 #include "chrome/browser/extensions/extension_system.h" 20 #include "chrome/browser/extensions/extension_system.h"
21 #include "chrome/browser/extensions/sandboxed_unpacker.h" 21 #include "chrome/browser/extensions/sandboxed_unpacker.h"
22 #include "chrome/browser/policy/browser_policy_connector.h" 22 #include "chrome/browser/policy/browser_policy_connector.h"
23 #include "chrome/browser/ui/webui/chromeos/login/oobe_ui.h" 23 #include "chrome/browser/ui/webui/chromeos/login/oobe_ui.h"
24 #include "chrome/common/chrome_notification_types.h" 24 #include "chrome/common/chrome_notification_types.h"
25 #include "chrome/common/extensions/extension.h" 25 #include "chrome/common/extensions/extension.h"
26 #include "chrome/common/extensions/extension_file_util.h" 26 #include "chrome/common/extensions/extension_file_util.h"
27 #include "chromeos/login/login_state.h" 27 #include "chromeos/login/login_state.h"
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 ShutdownKioskModeScreensaver(); 228 ShutdownKioskModeScreensaver();
229 } 229 }
230 } 230 }
231 231
232 void KioskModeScreensaver::OnUserActivity() { 232 void KioskModeScreensaver::OnUserActivity() {
233 // We don't want to handle further user notifications; we'll either login 233 // We don't want to handle further user notifications; we'll either login
234 // the user and close out or or at least close the screensaver. 234 // the user and close out or or at least close the screensaver.
235 ash::Shell::GetInstance()->user_activity_detector()->RemoveObserver(this); 235 ash::Shell::GetInstance()->user_activity_detector()->RemoveObserver(this);
236 236
237 // Find the retail mode login page. 237 // Find the retail mode login page.
238 if (WebUILoginDisplayHost::default_host()) { 238 if (LoginDisplayHostImpl::default_host()) {
239 WebUILoginDisplayHost* webui_host = 239 LoginDisplayHostImpl* webui_host =
240 static_cast<WebUILoginDisplayHost*>( 240 static_cast<LoginDisplayHostImpl*>(
241 WebUILoginDisplayHost::default_host()); 241 LoginDisplayHostImpl::default_host());
242 OobeUI* oobe_ui = webui_host->GetOobeUI(); 242 OobeUI* oobe_ui = webui_host->GetOobeUI();
243 243
244 // Show the login spinner. 244 // Show the login spinner.
245 if (oobe_ui) 245 if (oobe_ui)
246 oobe_ui->ShowRetailModeLoginSpinner(); 246 oobe_ui->ShowRetailModeLoginSpinner();
247 247
248 // Close the screensaver, our login spinner is already showing. 248 // Close the screensaver, our login spinner is already showing.
249 ash::CloseScreensaver(); 249 ash::CloseScreensaver();
250 250
251 // Log us in. 251 // Log us in.
(...skipping 20 matching lines...) Expand all
272 272
273 g_kiosk_mode_screensaver = new KioskModeScreensaver(); 273 g_kiosk_mode_screensaver = new KioskModeScreensaver();
274 } 274 }
275 275
276 void ShutdownKioskModeScreensaver() { 276 void ShutdownKioskModeScreensaver() {
277 delete g_kiosk_mode_screensaver; 277 delete g_kiosk_mode_screensaver;
278 g_kiosk_mode_screensaver = NULL; 278 g_kiosk_mode_screensaver = NULL;
279 } 279 }
280 280
281 } // namespace chromeos 281 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698