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

Side by Side Diff: chrome/browser/ui/webui/chromeos/login/user_board_screen_handler.cc

Issue 2713513009: cros: Break BaseScreenHandler into two classes. (Closed)
Patch Set: Add comments, fix compile Created 3 years, 9 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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/ui/webui/chromeos/login/user_board_screen_handler.h" 5 #include "chrome/browser/ui/webui/chromeos/login/user_board_screen_handler.h"
6 6
7 #include "chrome/browser/chromeos/login/screens/user_selection_screen.h" 7 #include "chrome/browser/chromeos/login/screens/user_selection_screen.h"
8 #include "components/login/localized_values_builder.h" 8 #include "components/login/localized_values_builder.h"
9 9
10 namespace chromeos { 10 namespace chromeos {
11 11
12 UserBoardScreenHandler::UserBoardScreenHandler() : weak_factory_(this) {} 12 UserBoardScreenHandler::UserBoardScreenHandler()
13 : BaseScreenHandler(kScreenId), weak_factory_(this) {}
13 14
14 UserBoardScreenHandler::~UserBoardScreenHandler() { 15 UserBoardScreenHandler::~UserBoardScreenHandler() {
15 } 16 }
16 17
17 void UserBoardScreenHandler::DeclareLocalizedValues( 18 void UserBoardScreenHandler::DeclareLocalizedValues(
18 ::login::LocalizedValuesBuilder* builder) { 19 ::login::LocalizedValuesBuilder* builder) {
19 } 20 }
20 21
21 void UserBoardScreenHandler::RegisterMessages() { 22 void UserBoardScreenHandler::RegisterMessages() {
22 AddCallback("getUsers", &UserBoardScreenHandler::HandleGetUsers); 23 AddCallback("getUsers", &UserBoardScreenHandler::HandleGetUsers);
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 void UserBoardScreenHandler::SetAuthType( 89 void UserBoardScreenHandler::SetAuthType(
89 const AccountId& account_id, 90 const AccountId& account_id,
90 proximity_auth::ScreenlockBridge::LockHandler::AuthType auth_type, 91 proximity_auth::ScreenlockBridge::LockHandler::AuthType auth_type,
91 const base::string16& initial_value) { 92 const base::string16& initial_value) {
92 CallJS("login.AccountPickerScreen.setAuthType", account_id, 93 CallJS("login.AccountPickerScreen.setAuthType", account_id,
93 static_cast<int>(auth_type), base::StringValue(initial_value)); 94 static_cast<int>(auth_type), base::StringValue(initial_value));
94 } 95 }
95 96
96 void UserBoardScreenHandler::Bind(UserSelectionScreen* screen) { 97 void UserBoardScreenHandler::Bind(UserSelectionScreen* screen) {
97 screen_ = screen; 98 screen_ = screen;
98 BaseScreenHandler::SetBaseScreen(screen_); 99 BaseWebUIHandler::SetBaseScreen(screen_);
99 } 100 }
100 101
101 void UserBoardScreenHandler::Unbind() { 102 void UserBoardScreenHandler::Unbind() {
102 screen_ = nullptr; 103 screen_ = nullptr;
103 BaseScreenHandler::SetBaseScreen(nullptr); 104 BaseWebUIHandler::SetBaseScreen(nullptr);
104 } 105 }
105 106
106 base::WeakPtr<UserBoardView> UserBoardScreenHandler::GetWeakPtr() { 107 base::WeakPtr<UserBoardView> UserBoardScreenHandler::GetWeakPtr() {
107 return weak_factory_.GetWeakPtr(); 108 return weak_factory_.GetWeakPtr();
108 } 109 }
109 110
110 } // namespace chromeos 111 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698