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

Side by Side Diff: chrome/browser/ui/startup/startup_browser_creator.cc

Issue 22914008: Refactor kiosk app launch to be part of login screen UI flow. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 4 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/ui/startup/startup_browser_creator.h" 5 #include "chrome/browser/ui/startup/startup_browser_creator.h"
6 6
7 #include <algorithm> // For max(). 7 #include <algorithm> // For max().
8 #include <set> 8 #include <set>
9 9
10 #include "apps/app_load_service.h" 10 #include "apps/app_load_service.h"
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 #include "chrome/installer/util/browser_distribution.h" 58 #include "chrome/installer/util/browser_distribution.h"
59 #include "content/public/browser/browser_thread.h" 59 #include "content/public/browser/browser_thread.h"
60 #include "content/public/browser/child_process_security_policy.h" 60 #include "content/public/browser/child_process_security_policy.h"
61 #include "content/public/browser/navigation_controller.h" 61 #include "content/public/browser/navigation_controller.h"
62 #include "grit/locale_settings.h" 62 #include "grit/locale_settings.h"
63 #include "net/base/net_util.h" 63 #include "net/base/net_util.h"
64 #include "ui/base/l10n/l10n_util.h" 64 #include "ui/base/l10n/l10n_util.h"
65 #include "ui/base/resource/resource_bundle.h" 65 #include "ui/base/resource/resource_bundle.h"
66 66
67 #if defined(OS_CHROMEOS) 67 #if defined(OS_CHROMEOS)
68 #include "chrome/browser/chromeos/app_mode/startup_app_launcher.h" 68 #include "chrome/browser/chromeos/app_mode/app_launch_utils.h"
69 #include "chrome/browser/chromeos/kiosk_mode/kiosk_mode_settings.h" 69 #include "chrome/browser/chromeos/kiosk_mode/kiosk_mode_settings.h"
70 #include "chrome/browser/chromeos/login/user_manager.h" 70 #include "chrome/browser/chromeos/login/user_manager.h"
71 #include "chrome/browser/chromeos/profiles/profile_helper.h" 71 #include "chrome/browser/chromeos/profiles/profile_helper.h"
72 #include "chromeos/chromeos_switches.h" 72 #include "chromeos/chromeos_switches.h"
73 #endif 73 #endif
74 74
75 #if defined(TOOLKIT_VIEWS) && defined(OS_LINUX) 75 #if defined(TOOLKIT_VIEWS) && defined(OS_LINUX)
76 #include "ui/base/touch/touch_factory_x11.h" 76 #include "ui/base/touch/touch_factory_x11.h"
77 #endif 77 #endif
78 78
(...skipping 509 matching lines...) Expand 10 before | Expand all | Expand 10 after
588 588
589 #if defined(OS_CHROMEOS) 589 #if defined(OS_CHROMEOS)
590 // The browser will be launched after the user logs in. 590 // The browser will be launched after the user logs in.
591 if (command_line.HasSwitch(chromeos::switches::kLoginManager) || 591 if (command_line.HasSwitch(chromeos::switches::kLoginManager) ||
592 command_line.HasSwitch(chromeos::switches::kLoginPassword)) { 592 command_line.HasSwitch(chromeos::switches::kLoginPassword)) {
593 silent_launch = true; 593 silent_launch = true;
594 } 594 }
595 595
596 if (chrome::IsRunningInAppMode() && 596 if (chrome::IsRunningInAppMode() &&
597 command_line.HasSwitch(switches::kAppId)) { 597 command_line.HasSwitch(switches::kAppId)) {
598 // StartupAppLauncher deletes itself when done. 598 chromeos::LaunchAppOrDie(
599 (new chromeos::StartupAppLauncher(
600 last_used_profile, 599 last_used_profile,
601 command_line.GetSwitchValueASCII(switches::kAppId)))->Start(); 600 command_line.GetSwitchValueASCII(switches::kAppId));
602 601
603 // Skip browser launch since app mode launches its app window. 602 // Skip browser launch since app mode launches its app window.
604 silent_launch = true; 603 silent_launch = true;
605 } 604 }
606 #endif 605 #endif
607 606
608 #if defined(TOOLKIT_VIEWS) && defined(USE_X11) 607 #if defined(TOOLKIT_VIEWS) && defined(USE_X11)
609 ui::TouchFactory::SetTouchDeviceListFromCommandLine(); 608 ui::TouchFactory::SetTouchDeviceListFromCommandLine();
610 #endif 609 #endif
611 610
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
744 743
745 // static 744 // static
746 bool StartupBrowserCreator::ActivatedProfile() { 745 bool StartupBrowserCreator::ActivatedProfile() {
747 return profile_launch_observer.Get().activated_profile(); 746 return profile_launch_observer.Get().activated_profile();
748 } 747 }
749 748
750 bool HasPendingUncleanExit(Profile* profile) { 749 bool HasPendingUncleanExit(Profile* profile) {
751 return profile->GetLastSessionExitType() == Profile::EXIT_CRASHED && 750 return profile->GetLastSessionExitType() == Profile::EXIT_CRASHED &&
752 !profile_launch_observer.Get().HasBeenLaunched(profile); 751 !profile_launch_observer.Get().HasBeenLaunched(profile);
753 } 752 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698