1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_USER_BOARD_VIEW_MOJO_H_
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_USER_BOARD_VIEW_MOJO_H_
7 
8 #include "base/macros.h"
9 #include "base/memory/weak_ptr.h"
10 #include "chrome/browser/chromeos/login/ui/views/user_board_view.h"
11 
12 namespace chromeos {
13 
14 // UserBoardView implementation that forwards calls to ash via mojo.
15 class UserBoardViewMojo : public UserBoardView {
16  public:
17   UserBoardViewMojo();
18   ~UserBoardViewMojo() override;
19 
20   // UserBoardView:
21   void SetPublicSessionDisplayName(const AccountId& account_id,
22                                    const std::string& display_name) override;
23   void SetPublicSessionLocales(const AccountId& account_id,
24                                std::unique_ptr<base::ListValue> locales,
25                                const std::string& default_locale,
26                                bool multiple_recommended_locales) override;
27   void SetPublicSessionShowFullManagementDisclosure(
28       bool show_full_management_disclosure) override;
29   void ShowBannerMessage(const base::string16& message,
30                          bool is_warning) override;
31   void ShowUserPodCustomIcon(
32       const AccountId& account_id,
33       const proximity_auth::ScreenlockBridge::UserPodCustomIconOptions& icon)
34       override;
35   void HideUserPodCustomIcon(const AccountId& account_id) override;
36   void SetAuthType(const AccountId& account_id,
37                    proximity_auth::mojom::AuthType auth_type,
38                    const base::string16& initial_value) override;
39   void SetTpmLockedState(const AccountId& account_id,
40                          bool is_locked,
41                          base::TimeDelta time_left) override;
Bind(UserSelectionScreen * screen)42   void Bind(UserSelectionScreen* screen) override {}
Unbind()43   void Unbind() override {}
44   base::WeakPtr<UserBoardView> GetWeakPtr() override;
45 
46  private:
47   base::WeakPtrFactory<UserBoardViewMojo> weak_factory_{this};
48 
49   DISALLOW_COPY_AND_ASSIGN(UserBoardViewMojo);
50 };
51 
52 }  // namespace chromeos
53 
54 #endif  // CHROME_BROWSER_CHROMEOS_LOGIN_USER_BOARD_VIEW_MOJO_H_
55