Chromium Code Reviews| 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..742df4fdf17c3f1af45729100bcf24126acc22bb 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,23 @@ 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: |
| + virtual void OnAppStarted() = 0; |
| + virtual void OnAppWindowLaunched() = 0; |
| + |
| + protected: |
| + virtual ~Delegate() = default; |
| + }; |
|
achuithb
2017/02/03 00:35:00
DISALLOW_COPY_AND_ASSIGN
Sergey Poromov
2017/02/03 15:15:36
Done.
|
| + |
| static ArcKioskAppService* Create(Profile* profile); |
| static ArcKioskAppService* Get(content::BrowserContext* context); |
| + void SetDelegate(Delegate* delegate); |
| + |
| // KeyedService overrides |
| void Shutdown() override; |
| @@ -59,6 +71,9 @@ class ArcKioskAppService |
| void OnMaintenanceSessionCreated() override; |
| void OnMaintenanceSessionFinished() override; |
| + // ArcKioskAppLauncher::Delegate overrides |
| + void OnAppWindowLaunched() override; |
| + |
| private: |
| explicit ArcKioskAppService(Profile* profile); |
| ~ArcKioskAppService() override; |
| @@ -77,6 +92,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); |
| }; |