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

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: Add ArcKioskBridge::Delegate. 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 11ea62d929fbdc2d6034c84b4bf49594e4bdffe8..2af3bc9a29efe35b6f35bd40c3d0cab972ac6a79 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
@@ -9,9 +9,9 @@
#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/ui/app_list/arc/arc_app_list_prefs.h"
Luis Héctor Chávez 2016/12/01 20:13:33 nit: can you remove this?
Sergey Poromov 2016/12/16 16:12:05 The class still overrides ArcAppListPrefs::Observe
+#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 chromeos {
@@ -24,10 +24,11 @@ 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* Get(content::BrowserContext* context);
+ static ArcKioskAppService* Create(Profile* profile);
+ static ArcKioskAppService* Get(Profile* context);
// ArcAppListPrefs::Observer overrides
void OnAppRegistered(const std::string& app_id,
@@ -42,8 +43,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,6 +57,7 @@ class ArcKioskAppService
Profile* const profile_;
ArcAppListPrefs* const prefs_;
Luis Héctor Chávez 2016/12/01 20:13:33 nit: can you remove this?
Sergey Poromov 2016/12/16 16:12:05 Done.
+ bool maintenance_session_running_;
ArcKioskAppManager* app_manager_;
std::string app_id_;
std::unique_ptr<ArcAppListPrefs::AppInfo> app_info_;

Powered by Google App Engine
This is Rietveld 408576698