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 79ed66a9176dc73f39f7f37ef5662a5d3c64513b..036fdcaa703024563ee85a28d9fbea416666e851 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 |
@@ -8,10 +8,15 @@ |
#include "base/macros.h" |
#include "chrome/browser/chromeos/app_mode/arc/arc_kiosk_app_launcher.h" |
#include "chrome/browser/chromeos/app_mode/arc/arc_kiosk_app_manager.h" |
+#include "chrome/browser/profiles/profile.h" |
#include "chrome/browser/ui/app_list/arc/arc_app_list_prefs.h" |
+#include "components/arc/kiosk/arc_kiosk_bridge.h" |
#include "components/keyed_service/core/keyed_service.h" |
#include "components/prefs/pref_change_registrar.h" |
-#include "content/public/browser/browser_context.h" |
+ |
+namespace content { |
+class BrowserContext; |
+} // namespace content |
namespace chromeos { |
@@ -24,11 +29,15 @@ namespace chromeos { |
class ArcKioskAppService |
: public KeyedService, |
public ArcAppListPrefs::Observer, |
- public ArcKioskAppManager::ArcKioskAppManagerObserver { |
+ public ArcKioskAppManager::ArcKioskAppManagerObserver, |
+ public arc::ArcKioskBridge::Delegate { |
public: |
- static ArcKioskAppService* Create(Profile* profile, ArcAppListPrefs* prefs); |
+ static ArcKioskAppService* Create(Profile* profile); |
static ArcKioskAppService* Get(content::BrowserContext* context); |
+ // KeyedService overrides |
+ void Shutdown() override; |
+ |
// ArcAppListPrefs::Observer overrides |
void OnAppRegistered(const std::string& app_id, |
const ArcAppListPrefs::AppInfo& app_info) override; |
@@ -43,8 +52,12 @@ class ArcKioskAppService |
// ArcKioskAppManager::Observer overrides |
void OnArcKioskAppsChanged() override; |
+ // ArcKioskBridge::Delegate overrides |
+ void OnMaintenanceSessionCreated() override; |
+ void OnMaintenanceSessionFinished() override; |
+ |
private: |
- ArcKioskAppService(Profile* profile, ArcAppListPrefs* prefs); |
+ explicit ArcKioskAppService(Profile* profile); |
~ArcKioskAppService() override; |
std::string GetAppId(); |
@@ -52,7 +65,7 @@ class ArcKioskAppService |
void PreconditionsChanged(); |
Profile* const profile_; |
- ArcAppListPrefs* const prefs_; |
+ bool maintenance_session_running_ = false; |
ArcKioskAppManager* app_manager_; |
std::string app_id_; |
std::unique_ptr<ArcAppListPrefs::AppInfo> app_info_; |