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

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

Issue 2524673003: arc: Stop/start ARC++ kiosk app when maintenance session started/finished. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nits and includes Created 4 years 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 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_;

Powered by Google App Engine
This is Rietveld 408576698