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

Unified Diff: chrome/browser/chromeos/login/arc_kiosk_controller.h

Issue 2649103006: arc: Add splash screen for ARC++ Kiosk startup (Closed)
Patch Set: 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/login/arc_kiosk_controller.h
diff --git a/chrome/browser/chromeos/login/arc_kiosk_controller.h b/chrome/browser/chromeos/login/arc_kiosk_controller.h
new file mode 100644
index 0000000000000000000000000000000000000000..a71f6ebba9df49cd7f42049f5fe1ebd45e87da43
--- /dev/null
+++ b/chrome/browser/chromeos/login/arc_kiosk_controller.h
@@ -0,0 +1,71 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_CHROMEOS_LOGIN_ARC_KIOSK_CONTROLLER_H_
+#define CHROME_BROWSER_CHROMEOS_LOGIN_ARC_KIOSK_CONTROLLER_H_
+
+#include "base/macros.h"
+#include "chrome/browser/chromeos/app_mode/arc/arc_kiosk_app_service.h"
+#include "chrome/browser/chromeos/login/screens/arc_kiosk_splash_screen_actor.h"
+#include "chrome/browser/chromeos/login/session/user_session_manager.h"
+#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.
+#include "chromeos/login/auth/login_performer.h"
+#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.
+#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.
+
+namespace chromeos {
+
+class LoginDisplayHost;
+class OobeUI;
+
+// Controller for the ARC kiosk launch process, responsible for
+// coordinating loading the ARC kiosk profile, and
+// updating the splash screen UI.
+class ArcKioskController : public LoginPerformer::Delegate,
+ public UserSessionManagerDelegate,
+ public ArcKioskAppService::Delegate,
+ public ArcKioskSplashScreenActor::Delegate {
+ public:
+ ArcKioskController(LoginDisplayHost* host, OobeUI* oobe_ui);
+
+ ~ArcKioskController();
+
+ // Starts ARC kiosk splash screen.
+ void StartArcKiosk(const AccountId& account_id);
+
+ private:
+ void CleanUp();
+
+ // LoginPerformer::Delegate implementation:
+ void OnAuthFailure(const AuthFailure& error) override;
+ void OnAuthSuccess(const UserContext& user_context) override;
+ void WhiteListCheckFailed(const std::string& email) override;
+ void PolicyLoadFailed() override;
+ void SetAuthFlowOffline(bool offline) override;
+
+ // UserSessionManagerDelegate implementation:
+ void OnProfilePrepared(Profile* profile, bool browser_launched) override;
+
+ // ArcKioskAppService::Delegate implementation:
+ void OnAppStarted() override;
+ void OnAppWindowLaunched() override;
+
+ // ArcKioskSplashScreenActor::Delegate implementation:
+ void OnCancelArcKioskLaunch() override;
+
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.
+ 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.
+ OobeUI* oobe_ui_;
+ ArcKioskSplashScreenActor* arc_kiosk_splash_screen_actor_ = nullptr;
+ 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.
+ Profile* profile_ = nullptr;
+
+ // Used to execute login operations.
+ std::unique_ptr<LoginPerformer> login_performer_ = nullptr;
+
+ DISALLOW_COPY_AND_ASSIGN(ArcKioskController);
+};
+
+} // namespace chromeos
+
+#endif // CHROME_BROWSER_CHROMEOS_LOGIN_ARC_KIOSK_CONTROLLER_H_

Powered by Google App Engine
This is Rietveld 408576698