| 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 <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "ash/common/shelf/wm_shelf.h" | |
| 10 #include "ash/common/wallpaper/wallpaper_controller.h" | 9 #include "ash/common/wallpaper/wallpaper_controller.h" |
| 11 #include "ash/common/wm_shell.h" | 10 #include "ash/common/wm_shell.h" |
| 12 #include "base/memory/ptr_util.h" | 11 #include "base/memory/ptr_util.h" |
| 13 #include "base/rand_util.h" | 12 #include "base/rand_util.h" |
| 14 #include "base/values.h" | 13 #include "base/values.h" |
| 15 #include "chrome/browser/chromeos/camera_detector.h" | 14 #include "chrome/browser/chromeos/camera_detector.h" |
| 16 #include "chrome/browser/chromeos/login/error_screens_histogram_helper.h" | 15 #include "chrome/browser/chromeos/login/error_screens_histogram_helper.h" |
| 17 #include "chrome/browser/chromeos/login/existing_user_controller.h" | 16 #include "chrome/browser/chromeos/login/existing_user_controller.h" |
| 18 #include "chrome/browser/chromeos/login/screen_manager.h" | 17 #include "chrome/browser/chromeos/login/screen_manager.h" |
| 19 #include "chrome/browser/chromeos/login/screens/base_screen_delegate.h" | 18 #include "chrome/browser/chromeos/login/screens/base_screen_delegate.h" |
| (...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 362 void SupervisedUserCreationScreen::OnManagerFullyAuthenticated( | 361 void SupervisedUserCreationScreen::OnManagerFullyAuthenticated( |
| 363 Profile* manager_profile) { | 362 Profile* manager_profile) { |
| 364 DBusThreadManager::Get() | 363 DBusThreadManager::Get() |
| 365 ->GetSessionManagerClient() | 364 ->GetSessionManagerClient() |
| 366 ->NotifySupervisedUserCreationStarted(); | 365 ->NotifySupervisedUserCreationStarted(); |
| 367 manager_signin_in_progress_ = false; | 366 manager_signin_in_progress_ = false; |
| 368 DCHECK(controller_.get()); | 367 DCHECK(controller_.get()); |
| 369 // For manager user, move wallpaper to locked container so that windows | 368 // For manager user, move wallpaper to locked container so that windows |
| 370 // created during the user image picker step are below it. | 369 // created during the user image picker step are below it. |
| 371 ash::WmShell::Get()->wallpaper_controller()->MoveToLockedContainer(); | 370 ash::WmShell::Get()->wallpaper_controller()->MoveToLockedContainer(); |
| 372 ash::WmShelf::ForWindow(ash::WmShell::Get()->GetPrimaryRootWindow()) | |
| 373 ->SetAlignment(ash::ShelfAlignment::SHELF_ALIGNMENT_BOTTOM_LOCKED); | |
| 374 | 371 |
| 375 controller_->SetManagerProfile(manager_profile); | 372 controller_->SetManagerProfile(manager_profile); |
| 376 if (actor_) | 373 if (actor_) |
| 377 actor_->ShowUsernamePage(); | 374 actor_->ShowUsernamePage(); |
| 378 | 375 |
| 379 last_page_ = kNameOfNewUserParametersScreen; | 376 last_page_ = kNameOfNewUserParametersScreen; |
| 380 CHECK(!sync_service_); | 377 CHECK(!sync_service_); |
| 381 sync_service_ = SupervisedUserSyncServiceFactory::GetForProfile( | 378 sync_service_ = SupervisedUserSyncServiceFactory::GetForProfile( |
| 382 manager_profile); | 379 manager_profile); |
| 383 sync_service_->AddObserver(this); | 380 sync_service_->AddObserver(this); |
| (...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 621 selected_image_ = user_manager::User::USER_IMAGE_EXTERNAL; | 618 selected_image_ = user_manager::User::USER_IMAGE_EXTERNAL; |
| 622 } else { | 619 } else { |
| 623 NOTREACHED() << "Unexpected image type: " << image_type; | 620 NOTREACHED() << "Unexpected image type: " << image_type; |
| 624 } | 621 } |
| 625 } | 622 } |
| 626 | 623 |
| 627 void SupervisedUserCreationScreen::OnImageAccepted() { | 624 void SupervisedUserCreationScreen::OnImageAccepted() { |
| 628 } | 625 } |
| 629 | 626 |
| 630 } // namespace chromeos | 627 } // namespace chromeos |
| OLD | NEW |