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

Side by Side Diff: chrome/browser/chromeos/login/signin_screen_controller.cc

Issue 2700303002: cros: Unify oobe View/Actor naming to just View. (Closed)
Patch Set: Rebase Created 3 years, 10 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
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/chromeos/login/signin_screen_controller.h" 5 #include "chrome/browser/chromeos/login/signin_screen_controller.h"
6 6
7 #include "chrome/browser/chrome_notification_types.h" 7 #include "chrome/browser/chrome_notification_types.h"
8 #include "chrome/browser/chromeos/login/lock/screen_locker.h" 8 #include "chrome/browser/chromeos/login/lock/screen_locker.h"
9 #include "chrome/browser/chromeos/login/lock/webui_screen_locker.h" 9 #include "chrome/browser/chromeos/login/lock/webui_screen_locker.h"
10 #include "chrome/browser/chromeos/login/screens/chrome_user_selection_screen.h" 10 #include "chrome/browser/chromeos/login/screens/chrome_user_selection_screen.h"
11 #include "chrome/browser/chromeos/login/ui/views/user_board_view.h" 11 #include "chrome/browser/chromeos/login/ui/views/user_board_view.h"
12 #include "chrome/browser/ui/webui/chromeos/login/oobe_ui.h" 12 #include "chrome/browser/ui/webui/chromeos/login/oobe_ui.h"
13 #include "chrome/browser/ui/webui/chromeos/login/signin_screen_handler.h" 13 #include "chrome/browser/ui/webui/chromeos/login/signin_screen_handler.h"
14 14
15 namespace chromeos { 15 namespace chromeos {
16 16
17 SignInScreenController* SignInScreenController::instance_ = nullptr; 17 SignInScreenController* SignInScreenController::instance_ = nullptr;
18 18
19 SignInScreenController::SignInScreenController( 19 SignInScreenController::SignInScreenController(
20 OobeUI* oobe_ui, 20 OobeUI* oobe_ui,
21 LoginDisplay::Delegate* login_display_delegate) 21 LoginDisplay::Delegate* login_display_delegate)
22 : oobe_ui_(oobe_ui), gaia_screen_(new GaiaScreen()) { 22 : oobe_ui_(oobe_ui), gaia_screen_(new GaiaScreen()) {
23 DCHECK(!instance_); 23 DCHECK(!instance_);
24 instance_ = this; 24 instance_ = this;
25 25
26 gaia_screen_->SetScreenHandler(oobe_ui_->GetGaiaScreenActor()); 26 gaia_screen_->SetScreenHandler(oobe_ui_->GetGaiaScreenView());
27 std::string display_type = oobe_ui->display_type(); 27 std::string display_type = oobe_ui->display_type();
28 user_selection_screen_.reset(new ChromeUserSelectionScreen(display_type)); 28 user_selection_screen_.reset(new ChromeUserSelectionScreen(display_type));
29 user_selection_screen_->SetLoginDisplayDelegate(login_display_delegate); 29 user_selection_screen_->SetLoginDisplayDelegate(login_display_delegate);
30 30
31 user_board_view_ = oobe_ui_->GetUserBoardScreenActor()->GetWeakPtr(); 31 user_board_view_ = oobe_ui_->GetUserBoardView()->GetWeakPtr();
32 user_selection_screen_->SetView(user_board_view_.get()); 32 user_selection_screen_->SetView(user_board_view_.get());
33 // TODO(jdufault): Bind and Unbind should be controlled by either the 33 // TODO(jdufault): Bind and Unbind should be controlled by either the
34 // Model/View which are then each responsible for automatically unbinding the 34 // Model/View which are then each responsible for automatically unbinding the
35 // other associated View/Model instance. Then we can eliminate this exposed 35 // other associated View/Model instance. Then we can eliminate this exposed
36 // WeakPtr logic. See crbug.com/685287. 36 // WeakPtr logic. See crbug.com/685287.
37 user_board_view_->Bind(user_selection_screen_.get()); 37 user_board_view_->Bind(user_selection_screen_.get());
38 38
39 registrar_.Add(this, chrome::NOTIFICATION_SESSION_STARTED, 39 registrar_.Add(this, chrome::NOTIFICATION_SESSION_STARTED,
40 content::NotificationService::AllSources()); 40 content::NotificationService::AllSources());
41 user_manager::UserManager::Get()->AddObserver(this); 41 user_manager::UserManager::Get()->AddObserver(this);
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 103
104 // Stop listening to any notification once session has started. 104 // Stop listening to any notification once session has started.
105 // Sign in screen objects are marked for deletion with DeleteSoon so 105 // Sign in screen objects are marked for deletion with DeleteSoon so
106 // make sure no object would be used after session has started. 106 // make sure no object would be used after session has started.
107 // http://crbug.com/125276 107 // http://crbug.com/125276
108 registrar_.RemoveAll(); 108 registrar_.RemoveAll();
109 user_manager::UserManager::Get()->RemoveObserver(this); 109 user_manager::UserManager::Get()->RemoveObserver(this);
110 } 110 }
111 111
112 } // namespace chromeos 112 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698