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

Unified Diff: chrome/browser/chromeos/app_mode/arc/arc_kiosk_app_service.h

Issue 2649103006: arc: Add splash screen for ARC++ Kiosk startup (Closed)
Patch Set: achuithb@ 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/app_mode/arc/arc_kiosk_app_service.h
diff --git a/chrome/browser/chromeos/app_mode/arc/arc_kiosk_app_service.h b/chrome/browser/chromeos/app_mode/arc/arc_kiosk_app_service.h
index a531ebbbe84c148097611874be9b53858897c964..2d5687ed187c58f2ac409f96ebf2d1ce4a8027aa 100644
--- a/chrome/browser/chromeos/app_mode/arc/arc_kiosk_app_service.h
+++ b/chrome/browser/chromeos/app_mode/arc/arc_kiosk_app_service.h
@@ -33,11 +33,27 @@ class ArcKioskAppService
: public KeyedService,
public ArcAppListPrefs::Observer,
public ArcKioskAppManager::ArcKioskAppManagerObserver,
- public arc::ArcKioskBridge::Delegate {
+ public arc::ArcKioskBridge::Delegate,
+ public ArcKioskAppLauncher::Delegate {
public:
+ class Delegate {
+ public:
+ Delegate() = default;
+ virtual void OnAppStarted() = 0;
+ virtual void OnAppWindowLaunched() = 0;
+
+ protected:
+ virtual ~Delegate() = default;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(Delegate);
+ };
+
static ArcKioskAppService* Create(Profile* profile);
static ArcKioskAppService* Get(content::BrowserContext* context);
+ void SetDelegate(Delegate* delegate);
+
// KeyedService overrides
void Shutdown() override;
@@ -59,6 +75,9 @@ class ArcKioskAppService
void OnMaintenanceSessionCreated() override;
void OnMaintenanceSessionFinished() override;
+ // ArcKioskAppLauncher::Delegate overrides
+ void OnAppWindowLaunched() override;
+
private:
explicit ArcKioskAppService(Profile* profile);
~ArcKioskAppService() override;
@@ -77,6 +96,8 @@ class ArcKioskAppService
// Keeps track whether the app is already launched
std::unique_ptr<ArcKioskAppLauncher> app_launcher_;
std::unique_ptr<ArcKioskNotificationBlocker> notification_blocker_;
+ // Not owning the delegate, delegate removes itself in destructor
+ Delegate* delegate_ = nullptr;
DISALLOW_COPY_AND_ASSIGN(ArcKioskAppService);
};

Powered by Google App Engine
This is Rietveld 408576698