| OLD | NEW |
| 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 { |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 CallJS("login.AccountPickerScreen.setPublicSessionLocales", account_id, | 64 CallJS("login.AccountPickerScreen.setPublicSessionLocales", account_id, |
| 65 *locales, default_locale, multiple_recommended_locales); | 65 *locales, default_locale, multiple_recommended_locales); |
| 66 } | 66 } |
| 67 | 67 |
| 68 void UserBoardScreenHandler::ShowBannerMessage(const base::string16& message) { | 68 void UserBoardScreenHandler::ShowBannerMessage(const base::string16& message) { |
| 69 CallJS("login.AccountPickerScreen.showBannerMessage", message); | 69 CallJS("login.AccountPickerScreen.showBannerMessage", message); |
| 70 } | 70 } |
| 71 | 71 |
| 72 void UserBoardScreenHandler::ShowUserPodCustomIcon( | 72 void UserBoardScreenHandler::ShowUserPodCustomIcon( |
| 73 const AccountId& account_id, | 73 const AccountId& account_id, |
| 74 const base::DictionaryValue& icon) { | 74 const proximity_auth::ScreenlockBridge::UserPodCustomIconOptions& |
| 75 CallJS("login.AccountPickerScreen.showUserPodCustomIcon", account_id, icon); | 75 icon_options) { |
| 76 std::unique_ptr<base::DictionaryValue> icon = |
| 77 icon_options.ToDictionaryValue(); |
| 78 if (!icon || icon->empty()) |
| 79 return; |
| 80 CallJS("login.AccountPickerScreen.showUserPodCustomIcon", account_id, *icon); |
| 76 } | 81 } |
| 77 | 82 |
| 78 void UserBoardScreenHandler::HideUserPodCustomIcon( | 83 void UserBoardScreenHandler::HideUserPodCustomIcon( |
| 79 const AccountId& account_id) { | 84 const AccountId& account_id) { |
| 80 CallJS("login.AccountPickerScreen.hideUserPodCustomIcon", account_id); | 85 CallJS("login.AccountPickerScreen.hideUserPodCustomIcon", account_id); |
| 81 } | 86 } |
| 82 | 87 |
| 83 void UserBoardScreenHandler::SetAuthType( | 88 void UserBoardScreenHandler::SetAuthType( |
| 84 const AccountId& account_id, | 89 const AccountId& account_id, |
| 85 proximity_auth::ScreenlockBridge::LockHandler::AuthType auth_type, | 90 proximity_auth::ScreenlockBridge::LockHandler::AuthType auth_type, |
| (...skipping 10 matching lines...) Expand all Loading... |
| 96 void UserBoardScreenHandler::Unbind() { | 101 void UserBoardScreenHandler::Unbind() { |
| 97 screen_ = nullptr; | 102 screen_ = nullptr; |
| 98 BaseWebUIHandler::SetBaseScreen(nullptr); | 103 BaseWebUIHandler::SetBaseScreen(nullptr); |
| 99 } | 104 } |
| 100 | 105 |
| 101 base::WeakPtr<UserBoardView> UserBoardScreenHandler::GetWeakPtr() { | 106 base::WeakPtr<UserBoardView> UserBoardScreenHandler::GetWeakPtr() { |
| 102 return weak_factory_.GetWeakPtr(); | 107 return weak_factory_.GetWeakPtr(); |
| 103 } | 108 } |
| 104 | 109 |
| 105 } // namespace chromeos | 110 } // namespace chromeos |
| OLD | NEW |