OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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 #ifndef CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_USER_BOARD_SCREEN_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_USER_BOARD_SCREEN_HANDLER_H_ |
6 #define CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_USER_BOARD_SCREEN_HANDLER_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_USER_BOARD_SCREEN_HANDLER_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
11 #include "base/macros.h" | 11 #include "base/macros.h" |
12 #include "base/values.h" | 12 #include "base/values.h" |
13 #include "chrome/browser/chromeos/login/ui/views/user_board_view.h" | 13 #include "chrome/browser/chromeos/login/ui/views/user_board_view.h" |
14 #include "chrome/browser/ui/webui/chromeos/login/base_screen_handler.h" | 14 #include "chrome/browser/ui/webui/chromeos/login/base_screen_handler.h" |
15 | 15 |
16 namespace chromeos { | 16 namespace chromeos { |
17 | 17 |
| 18 // TODO(jdufault): Rename to UserSelectionScreenHandler and ensure this in the |
| 19 // right directory. See crbug.com/672142. |
| 20 |
18 // A class that handles WebUI hooks in Gaia screen. | 21 // A class that handles WebUI hooks in Gaia screen. |
19 class UserBoardScreenHandler : public BaseScreenHandler, public UserBoardView { | 22 class UserBoardScreenHandler : public BaseScreenHandler, public UserBoardView { |
20 public: | 23 public: |
21 UserBoardScreenHandler(); | 24 UserBoardScreenHandler(); |
22 ~UserBoardScreenHandler() override; | 25 ~UserBoardScreenHandler() override; |
23 | 26 |
24 private: | 27 private: |
25 // BaseScreenHandler implementation: | 28 // BaseScreenHandler implementation: |
26 void DeclareLocalizedValues( | 29 void DeclareLocalizedValues( |
27 ::login::LocalizedValuesBuilder* builder) override; | 30 ::login::LocalizedValuesBuilder* builder) override; |
(...skipping 16 matching lines...) Expand all Loading... |
44 const std::string& default_locale, | 47 const std::string& default_locale, |
45 bool multiple_recommended_locales) override; | 48 bool multiple_recommended_locales) override; |
46 void ShowBannerMessage(const base::string16& message) override; | 49 void ShowBannerMessage(const base::string16& message) override; |
47 void ShowUserPodCustomIcon(const AccountId& account_id, | 50 void ShowUserPodCustomIcon(const AccountId& account_id, |
48 const base::DictionaryValue& icon) override; | 51 const base::DictionaryValue& icon) override; |
49 void HideUserPodCustomIcon(const AccountId& account_id) override; | 52 void HideUserPodCustomIcon(const AccountId& account_id) override; |
50 void SetAuthType( | 53 void SetAuthType( |
51 const AccountId& account_id, | 54 const AccountId& account_id, |
52 proximity_auth::ScreenlockBridge::LockHandler::AuthType auth_type, | 55 proximity_auth::ScreenlockBridge::LockHandler::AuthType auth_type, |
53 const base::string16& initial_value) override; | 56 const base::string16& initial_value) override; |
54 | 57 void Bind(UserSelectionScreen* screen) override; |
55 void Bind(UserBoardModel& model) override; | |
56 void Unbind() override; | 58 void Unbind() override; |
57 base::WeakPtr<UserBoardView> GetWeakPtr() override; | 59 base::WeakPtr<UserBoardView> GetWeakPtr() override; |
58 | 60 |
59 UserBoardModel* model_; | 61 UserSelectionScreen* screen_ = nullptr; |
60 base::WeakPtrFactory<UserBoardScreenHandler> weak_factory_; | 62 base::WeakPtrFactory<UserBoardScreenHandler> weak_factory_; |
61 | 63 |
62 DISALLOW_COPY_AND_ASSIGN(UserBoardScreenHandler); | 64 DISALLOW_COPY_AND_ASSIGN(UserBoardScreenHandler); |
63 }; | 65 }; |
64 | 66 |
65 } // namespace chromeos | 67 } // namespace chromeos |
66 | 68 |
67 #endif // CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_USER_BOARD_SCREEN_HANDLER_H_ | 69 #endif // CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_USER_BOARD_SCREEN_HANDLER_H_ |
OLD | NEW |