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

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: fix build Created 3 years, 11 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 "base/timer/timer.h"
10 #include "chrome/browser/chromeos/app_mode/arc/arc_kiosk_app_service.h"
11 #include "chrome/browser/chromeos/login/screens/arc_kiosk_splash_screen_actor.h"
12 #include "chrome/browser/chromeos/login/session/user_session_manager.h"
13 #include "chromeos/login/auth/login_performer.h"
14 #include "chromeos/login/auth/user_context.h"
Luis Héctor Chávez 2017/01/25 17:46:40 you forgot to remove this and account_id.h
Sergey Poromov 2017/01/26 17:08:52 Done.
15 #include "components/signin/core/account_id/account_id.h"
16
17 class AccountId;
18 class Profile;
19
20 namespace chromeos {
21
22 class LoginDisplayHost;
23 class OobeUI;
24 class UserContext;
25
26 // Controller for the ARC kiosk launch process, responsible for
27 // coordinating loading the ARC kiosk profile, and
28 // updating the splash screen UI.
29 class ArcKioskController : public LoginPerformer::Delegate,
30 public UserSessionManagerDelegate,
31 public ArcKioskAppService::Delegate,
32 public ArcKioskSplashScreenActor::Delegate {
33 public:
34 ArcKioskController(LoginDisplayHost* host, OobeUI* oobe_ui);
35
36 ~ArcKioskController() override;
37
38 // Starts ARC kiosk splash screen.
39 void StartArcKiosk(const AccountId& account_id);
40
41 private:
42 void CleanUp();
43
44 // LoginPerformer::Delegate implementation:
45 void OnAuthFailure(const AuthFailure& error) override;
46 void OnAuthSuccess(const UserContext& user_context) override;
47 void WhiteListCheckFailed(const std::string& email) override;
48 void PolicyLoadFailed() override;
49 void SetAuthFlowOffline(bool offline) override;
50
51 // UserSessionManagerDelegate implementation:
52 void OnProfilePrepared(Profile* profile, bool browser_launched) override;
53
54 // ArcKioskAppService::Delegate implementation:
55 void OnAppStarted() override;
56 void OnAppWindowLaunched() override;
57
58 // ArcKioskSplashScreenActor::Delegate implementation:
59 void OnCancelArcKioskLaunch() override;
60
61 // LoginDisplayHost owns itself.
62 LoginDisplayHost* const host_;
63 // Owned by OobeUI.
64 ArcKioskSplashScreenActor* const arc_kiosk_splash_screen_actor_ = nullptr;
Luis Héctor Chávez 2017/01/25 17:46:40 You shouldn't initialize this to nullptr here sinc
Sergey Poromov 2017/01/26 17:08:52 Done.
65 // Not owning here.
66 Profile* profile_ = nullptr;
67
68 // Used to execute login operations.
69 std::unique_ptr<LoginPerformer> login_performer_ = nullptr;
70
71 // A timer to ensure the app splash is shown for a minimum amount of time.
72 base::OneShotTimer splash_wait_timer_;
73 int64_t launch_splash_start_time_ = 0;
Luis Héctor Chávez 2017/01/25 17:46:40 nit: base::Time launch_splash_screen_time_;
Sergey Poromov 2017/01/26 17:08:52 Done.
74
75 DISALLOW_COPY_AND_ASSIGN(ArcKioskController);
76 };
77
78 } // namespace chromeos
79
80 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_ARC_KIOSK_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698