Chromium Code Reviews| OLD | NEW | 
|---|---|
| (Empty) | |
| 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_ARC_KIOSK_CONTROLLER_H_ | |
| 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_ARC_KIOSK_CONTROLLER_H_ | |
| 7 | |
| 8 #include "base/macros.h" | |
| 9 #include "chrome/browser/chromeos/app_mode/arc/arc_kiosk_app_service.h" | |
| 10 #include "chrome/browser/chromeos/login/screens/arc_kiosk_splash_screen_actor.h" | |
| 11 #include "chrome/browser/chromeos/login/session/user_session_manager.h" | |
| 12 #include "chrome/browser/profiles/profile.h" | |
| 
 
Luis Héctor Chávez
2017/01/24 18:40:24
Can you remove this and fwd-declare it?
 
Sergey Poromov
2017/01/25 14:29:21
Done.
 
 | |
| 13 #include "chromeos/login/auth/login_performer.h" | |
| 14 #include "chromeos/login/auth/user_context.h" | |
| 
 
Luis Héctor Chávez
2017/01/24 18:40:24
same
 
Sergey Poromov
2017/01/25 14:29:21
Done.
 
 | |
| 15 #include "components/signin/core/account_id/account_id.h" | |
| 
 
Luis Héctor Chávez
2017/01/24 18:40:24
same
 
Sergey Poromov
2017/01/25 14:29:21
Done.
 
 | |
| 16 | |
| 17 namespace chromeos { | |
| 18 | |
| 19 class LoginDisplayHost; | |
| 20 class OobeUI; | |
| 21 | |
| 22 // Controller for the ARC kiosk launch process, responsible for | |
| 23 // coordinating loading the ARC kiosk profile, and | |
| 24 // updating the splash screen UI. | |
| 25 class ArcKioskController : public LoginPerformer::Delegate, | |
| 26 public UserSessionManagerDelegate, | |
| 27 public ArcKioskAppService::Delegate, | |
| 28 public ArcKioskSplashScreenActor::Delegate { | |
| 29 public: | |
| 30 ArcKioskController(LoginDisplayHost* host, OobeUI* oobe_ui); | |
| 31 | |
| 32 ~ArcKioskController(); | |
| 33 | |
| 34 // Starts ARC kiosk splash screen. | |
| 35 void StartArcKiosk(const AccountId& account_id); | |
| 36 | |
| 37 private: | |
| 38 void CleanUp(); | |
| 39 | |
| 40 // LoginPerformer::Delegate implementation: | |
| 41 void OnAuthFailure(const AuthFailure& error) override; | |
| 42 void OnAuthSuccess(const UserContext& user_context) override; | |
| 43 void WhiteListCheckFailed(const std::string& email) override; | |
| 44 void PolicyLoadFailed() override; | |
| 45 void SetAuthFlowOffline(bool offline) override; | |
| 46 | |
| 47 // UserSessionManagerDelegate implementation: | |
| 48 void OnProfilePrepared(Profile* profile, bool browser_launched) override; | |
| 49 | |
| 50 // ArcKioskAppService::Delegate implementation: | |
| 51 void OnAppStarted() override; | |
| 52 void OnAppWindowLaunched() override; | |
| 53 | |
| 54 // ArcKioskSplashScreenActor::Delegate implementation: | |
| 55 void OnCancelArcKioskLaunch() override; | |
| 56 | |
| 
 
Luis Héctor Chávez
2017/01/24 18:40:24
Please note who owns all of these raw pointers, an
 
Sergey Poromov
2017/01/25 14:29:21
Done.
 
 | |
| 57 LoginDisplayHost* host_; | |
| 
 
Luis Héctor Chávez
2017/01/24 18:40:24
These three can be * const.
 
Sergey Poromov
2017/01/25 14:29:21
Done.
 
 | |
| 58 OobeUI* oobe_ui_; | |
| 59 ArcKioskSplashScreenActor* arc_kiosk_splash_screen_actor_ = nullptr; | |
| 60 ArcKioskAppService* arc_kiosk_app_service_ = nullptr; | |
| 
 
Luis Héctor Chávez
2017/01/24 18:40:24
unused?
 
Sergey Poromov
2017/01/25 14:29:21
Done.
 
 | |
| 61 Profile* profile_ = nullptr; | |
| 62 | |
| 63 // Used to execute login operations. | |
| 64 std::unique_ptr<LoginPerformer> login_performer_ = nullptr; | |
| 65 | |
| 66 DISALLOW_COPY_AND_ASSIGN(ArcKioskController); | |
| 67 }; | |
| 68 | |
| 69 } // namespace chromeos | |
| 70 | |
| 71 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_ARC_KIOSK_CONTROLLER_H_ | |
| OLD | NEW |