Chromium Code Reviews| Index: chrome/browser/chromeos/login/users/chrome_user_manager_impl.cc |
| diff --git a/chrome/browser/chromeos/login/users/chrome_user_manager_impl.cc b/chrome/browser/chromeos/login/users/chrome_user_manager_impl.cc |
| index 2edff5afe3d251c826d78dc795bcbbdfca6a8c74..80b9d62505258a5c84d7bdb2fe2cff366bd34783 100644 |
| --- a/chrome/browser/chromeos/login/users/chrome_user_manager_impl.cc |
| +++ b/chrome/browser/chromeos/login/users/chrome_user_manager_impl.cc |
| @@ -448,7 +448,8 @@ void ChromeUserManagerImpl::Observe( |
| break; |
| case chrome::NOTIFICATION_LOGIN_USER_PROFILE_PREPARED: { |
| Profile* profile = content::Details<Profile>(details).ptr(); |
| - if (IsUserLoggedIn() && !IsLoggedInAsGuest() && !IsLoggedInAsKioskApp()) { |
| + if (IsUserLoggedIn() && !IsLoggedInAsGuest() && !IsLoggedInAsKioskApp() && |
| + !IsLoggedInAsArcKioskApp()) { |
| if (IsLoggedInAsSupervisedUser()) |
| SupervisedUserPasswordServiceFactory::GetForProfile(profile); |
| if (IsLoggedInAsUserWithGaiaAccount()) |
| @@ -866,6 +867,25 @@ void ChromeUserManagerImpl::KioskAppLoggedIn(user_manager::User* user) { |
| command_line->AppendSwitch(wm::switches::kWindowAnimationsDisabled); |
| } |
| +void ChromeUserManagerImpl::ArcKioskAppLoggedIn(user_manager::User* user) { |
| + DCHECK_CURRENTLY_ON(BrowserThread::UI); |
| + |
| + active_user_ = user; |
| + active_user_->SetStubImage( |
| + base::MakeUnique<user_manager::UserImage>( |
| + *ResourceBundle::GetSharedInstance().GetImageSkiaNamed( |
| + IDR_PROFILE_PICTURE_LOADING)), |
| + user_manager::User::USER_IMAGE_INVALID, false); |
| + |
| + base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); |
| + command_line->AppendSwitch(chromeos::switches::kEnableArc); |
|
hidehiko
2016/11/16 18:57:07
Could you set arc.enabled and arc.terms.accepted p
xiyuan
2016/11/16 19:00:17
If we need to do this, we need to do it somewhere
Sergey Poromov
2016/11/17 12:33:13
Both of these preferences are set fir ARC kiosk in
|
| + command_line->AppendSwitch(::switches::kForceAndroidAppMode); |
| + |
| + // Disable window animation since kiosk app runs in a single full screen |
| + // window and window animation causes start-up janks. |
| + command_line->AppendSwitch(wm::switches::kWindowAnimationsDisabled); |
| +} |
| + |
| void ChromeUserManagerImpl::DemoAccountLoggedIn() { |
| DCHECK_CURRENTLY_ON(BrowserThread::UI); |
| active_user_ = |