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 345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
365 void SupervisedUserCreationScreen::OnManagerFullyAuthenticated( | 364 void SupervisedUserCreationScreen::OnManagerFullyAuthenticated( |
366 Profile* manager_profile) { | 365 Profile* manager_profile) { |
367 DBusThreadManager::Get() | 366 DBusThreadManager::Get() |
368 ->GetSessionManagerClient() | 367 ->GetSessionManagerClient() |
369 ->NotifySupervisedUserCreationStarted(); | 368 ->NotifySupervisedUserCreationStarted(); |
370 manager_signin_in_progress_ = false; | 369 manager_signin_in_progress_ = false; |
371 DCHECK(controller_.get()); | 370 DCHECK(controller_.get()); |
372 // For manager user, move wallpaper to locked container so that windows | 371 // For manager user, move wallpaper to locked container so that windows |
373 // created during the user image picker step are below it. | 372 // created during the user image picker step are below it. |
374 ash::WmShell::Get()->wallpaper_controller()->MoveToLockedContainer(); | 373 ash::WmShell::Get()->wallpaper_controller()->MoveToLockedContainer(); |
375 ash::WmShelf::ForWindow(ash::WmShell::Get()->GetPrimaryRootWindow()) | |
376 ->SetAlignment(ash::ShelfAlignment::SHELF_ALIGNMENT_BOTTOM_LOCKED); | |
377 | 374 |
378 controller_->SetManagerProfile(manager_profile); | 375 controller_->SetManagerProfile(manager_profile); |
379 if (actor_) | 376 if (actor_) |
380 actor_->ShowUsernamePage(); | 377 actor_->ShowUsernamePage(); |
381 | 378 |
382 last_page_ = kNameOfNewUserParametersScreen; | 379 last_page_ = kNameOfNewUserParametersScreen; |
383 CHECK(!sync_service_); | 380 CHECK(!sync_service_); |
384 sync_service_ = SupervisedUserSyncServiceFactory::GetForProfile( | 381 sync_service_ = SupervisedUserSyncServiceFactory::GetForProfile( |
385 manager_profile); | 382 manager_profile); |
386 sync_service_->AddObserver(this); | 383 sync_service_->AddObserver(this); |
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
624 selected_image_ = user_manager::User::USER_IMAGE_EXTERNAL; | 621 selected_image_ = user_manager::User::USER_IMAGE_EXTERNAL; |
625 } else { | 622 } else { |
626 NOTREACHED() << "Unexpected image type: " << image_type; | 623 NOTREACHED() << "Unexpected image type: " << image_type; |
627 } | 624 } |
628 } | 625 } |
629 | 626 |
630 void SupervisedUserCreationScreen::OnImageAccepted() { | 627 void SupervisedUserCreationScreen::OnImageAccepted() { |
631 } | 628 } |
632 | 629 |
633 } // namespace chromeos | 630 } // namespace chromeos |
OLD | NEW |