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

Side by Side Diff: chrome/browser/chromeos/login/arc_kiosk_controller.h

Issue 2649103006: arc: Add splash screen for ARC++ Kiosk startup (Closed)
Patch Set: lhchavez@ comments Created 3 years, 10 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
(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 "chromeos/login/auth/login_performer.h"
13
14 class AccountId;
15 class Profile;
16
17 namespace base {
18 class OneShotTimer;
19 } // namespace base
20
21 namespace chromeos {
22
23 class LoginDisplayHost;
24 class OobeUI;
25 class UserContext;
26
27 // Controller for the ARC kiosk launch process, responsible for
28 // coordinating loading the ARC kiosk profile, and
29 // updating the splash screen UI.
30 class ArcKioskController : public LoginPerformer::Delegate,
31 public UserSessionManagerDelegate,
32 public ArcKioskAppService::Delegate,
33 public ArcKioskSplashScreenActor::Delegate {
34 public:
35 ArcKioskController(LoginDisplayHost* host, OobeUI* oobe_ui);
36
37 ~ArcKioskController() override;
38
39 // Starts ARC kiosk splash screen.
40 void StartArcKiosk(const AccountId& account_id);
41
42 private:
43 void CleanUp();
44 void CloseSplashScreen();
45
46 // LoginPerformer::Delegate implementation:
47 void OnAuthFailure(const AuthFailure& error) override;
48 void OnAuthSuccess(const UserContext& user_context) override;
49 void WhiteListCheckFailed(const std::string& email) override;
50 void PolicyLoadFailed() override;
51 void SetAuthFlowOffline(bool offline) override;
52
53 // UserSessionManagerDelegate implementation:
54 void OnProfilePrepared(Profile* profile, bool browser_launched) override;
55
56 // ArcKioskAppService::Delegate implementation:
57 void OnAppStarted() override;
58 void OnAppWindowLaunched() override;
59
60 // ArcKioskSplashScreenActor::Delegate implementation:
61 void OnCancelArcKioskLaunch() override;
62
63 // LoginDisplayHost owns itself.
64 LoginDisplayHost* const host_;
65 // Owned by OobeUI.
66 ArcKioskSplashScreenActor* const arc_kiosk_splash_screen_actor_;
67 // Not owning here.
68 Profile* profile_ = nullptr;
69
70 // Used to execute login operations.
71 std::unique_ptr<LoginPerformer> login_performer_ = nullptr;
72
73 // A timer to ensure the app splash is shown for a minimum amount of time.
74 base::OneShotTimer splash_wait_timer_;
75 bool launched_ = false;
76
77 DISALLOW_COPY_AND_ASSIGN(ArcKioskController);
78 };
79
80 } // namespace chromeos
81
82 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_ARC_KIOSK_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698