| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/login/supervised/supervised_user_creation_scre
en.h" | 5 #include "chrome/browser/chromeos/login/supervised/supervised_user_creation_scre
en.h" |
| 6 | 6 |
| 7 #include "ash/desktop_background/desktop_background_controller.h" | 7 #include "ash/desktop_background/desktop_background_controller.h" |
| 8 #include "ash/shelf/shelf.h" |
| 8 #include "ash/shell.h" | 9 #include "ash/shell.h" |
| 9 #include "base/rand_util.h" | 10 #include "base/rand_util.h" |
| 10 #include "base/values.h" | 11 #include "base/values.h" |
| 11 #include "chrome/browser/chromeos/camera_detector.h" | 12 #include "chrome/browser/chromeos/camera_detector.h" |
| 12 #include "chrome/browser/chromeos/login/error_screens_histogram_helper.h" | 13 #include "chrome/browser/chromeos/login/error_screens_histogram_helper.h" |
| 13 #include "chrome/browser/chromeos/login/existing_user_controller.h" | 14 #include "chrome/browser/chromeos/login/existing_user_controller.h" |
| 14 #include "chrome/browser/chromeos/login/screen_manager.h" | 15 #include "chrome/browser/chromeos/login/screen_manager.h" |
| 15 #include "chrome/browser/chromeos/login/screens/base_screen_delegate.h" | 16 #include "chrome/browser/chromeos/login/screens/base_screen_delegate.h" |
| 16 #include "chrome/browser/chromeos/login/screens/error_screen.h" | 17 #include "chrome/browser/chromeos/login/screens/error_screen.h" |
| 17 #include "chrome/browser/chromeos/login/screens/network_error.h" | 18 #include "chrome/browser/chromeos/login/screens/network_error.h" |
| 18 #include "chrome/browser/chromeos/login/signin_specifics.h" | 19 #include "chrome/browser/chromeos/login/signin_specifics.h" |
| 19 #include "chrome/browser/chromeos/login/supervised/supervised_user_authenticatio
n.h" | 20 #include "chrome/browser/chromeos/login/supervised/supervised_user_authenticatio
n.h" |
| 20 #include "chrome/browser/chromeos/login/supervised/supervised_user_creation_cont
roller.h" | 21 #include "chrome/browser/chromeos/login/supervised/supervised_user_creation_cont
roller.h" |
| 21 #include "chrome/browser/chromeos/login/supervised/supervised_user_creation_cont
roller_new.h" | 22 #include "chrome/browser/chromeos/login/supervised/supervised_user_creation_cont
roller_new.h" |
| 22 #include "chrome/browser/chromeos/login/supervised/supervised_user_creation_flow
.h" | 23 #include "chrome/browser/chromeos/login/supervised/supervised_user_creation_flow
.h" |
| 23 #include "chrome/browser/chromeos/login/ui/login_display_host.h" | |
| 24 #include "chrome/browser/chromeos/login/users/avatar/user_image_manager.h" | 24 #include "chrome/browser/chromeos/login/users/avatar/user_image_manager.h" |
| 25 #include "chrome/browser/chromeos/login/users/chrome_user_manager.h" | 25 #include "chrome/browser/chromeos/login/users/chrome_user_manager.h" |
| 26 #include "chrome/browser/chromeos/login/users/supervised_user_manager.h" | 26 #include "chrome/browser/chromeos/login/users/supervised_user_manager.h" |
| 27 #include "chrome/browser/chromeos/login/wizard_controller.h" | 27 #include "chrome/browser/chromeos/login/wizard_controller.h" |
| 28 #include "chrome/browser/supervised_user/legacy/supervised_user_shared_settings_
service.h" | 28 #include "chrome/browser/supervised_user/legacy/supervised_user_shared_settings_
service.h" |
| 29 #include "chrome/browser/supervised_user/legacy/supervised_user_shared_settings_
service_factory.h" | 29 #include "chrome/browser/supervised_user/legacy/supervised_user_shared_settings_
service_factory.h" |
| 30 #include "chrome/browser/supervised_user/legacy/supervised_user_sync_service.h" | 30 #include "chrome/browser/supervised_user/legacy/supervised_user_sync_service.h" |
| 31 #include "chrome/browser/supervised_user/legacy/supervised_user_sync_service_fac
tory.h" | 31 #include "chrome/browser/supervised_user/legacy/supervised_user_sync_service_fac
tory.h" |
| 32 #include "chrome/browser/supervised_user/supervised_user_constants.h" | 32 #include "chrome/browser/supervised_user/supervised_user_constants.h" |
| 33 #include "chrome/browser/ui/webui/chromeos/login/oobe_ui.h" | 33 #include "chrome/browser/ui/webui/chromeos/login/oobe_ui.h" |
| (...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 368 Profile* manager_profile) { | 368 Profile* manager_profile) { |
| 369 DBusThreadManager::Get() | 369 DBusThreadManager::Get() |
| 370 ->GetSessionManagerClient() | 370 ->GetSessionManagerClient() |
| 371 ->NotifySupervisedUserCreationStarted(); | 371 ->NotifySupervisedUserCreationStarted(); |
| 372 manager_signin_in_progress_ = false; | 372 manager_signin_in_progress_ = false; |
| 373 DCHECK(controller_.get()); | 373 DCHECK(controller_.get()); |
| 374 // For manager user, move desktop to locked container so that windows created | 374 // For manager user, move desktop to locked container so that windows created |
| 375 // during the user image picker step are below it. | 375 // during the user image picker step are below it. |
| 376 ash::Shell::GetInstance()-> | 376 ash::Shell::GetInstance()-> |
| 377 desktop_background_controller()->MoveDesktopToLockedContainer(); | 377 desktop_background_controller()->MoveDesktopToLockedContainer(); |
| 378 | 378 ash::Shelf::ForPrimaryDisplay()->SetAlignment( |
| 379 // Hide the status area and the control bar, since they will show up at the | 379 ash::ShelfAlignment::SHELF_ALIGNMENT_BOTTOM_LOCKED); |
| 380 // logged in users's preferred location, which could be on the left or right | |
| 381 // side of the screen. | |
| 382 LoginDisplayHost* default_host = LoginDisplayHost::default_host(); | |
| 383 default_host->SetStatusAreaVisible(false); | |
| 384 default_host->GetOobeUI()->GetCoreOobeActor()->ShowControlBar(false); | |
| 385 | 380 |
| 386 controller_->SetManagerProfile(manager_profile); | 381 controller_->SetManagerProfile(manager_profile); |
| 387 if (actor_) | 382 if (actor_) |
| 388 actor_->ShowUsernamePage(); | 383 actor_->ShowUsernamePage(); |
| 389 | 384 |
| 390 last_page_ = kNameOfNewUserParametersScreen; | 385 last_page_ = kNameOfNewUserParametersScreen; |
| 391 CHECK(!sync_service_); | 386 CHECK(!sync_service_); |
| 392 sync_service_ = SupervisedUserSyncServiceFactory::GetForProfile( | 387 sync_service_ = SupervisedUserSyncServiceFactory::GetForProfile( |
| 393 manager_profile); | 388 manager_profile); |
| 394 sync_service_->AddObserver(this); | 389 sync_service_->AddObserver(this); |
| (...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 633 selected_image_ = user_manager::User::USER_IMAGE_EXTERNAL; | 628 selected_image_ = user_manager::User::USER_IMAGE_EXTERNAL; |
| 634 } else { | 629 } else { |
| 635 NOTREACHED() << "Unexpected image type: " << image_type; | 630 NOTREACHED() << "Unexpected image type: " << image_type; |
| 636 } | 631 } |
| 637 } | 632 } |
| 638 | 633 |
| 639 void SupervisedUserCreationScreen::OnImageAccepted() { | 634 void SupervisedUserCreationScreen::OnImageAccepted() { |
| 640 } | 635 } |
| 641 | 636 |
| 642 } // namespace chromeos | 637 } // namespace chromeos |
| OLD | NEW |