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

Side by Side 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: Created 4 years, 1 month 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_CHROMEOS_APP_MODE_ARC_ARC_KIOSK_APP_SERVICE_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_APP_MODE_ARC_ARC_KIOSK_APP_SERVICE_H_
6 #define CHROME_BROWSER_CHROMEOS_APP_MODE_ARC_ARC_KIOSK_APP_SERVICE_H_ 6 #define CHROME_BROWSER_CHROMEOS_APP_MODE_ARC_ARC_KIOSK_APP_SERVICE_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "chrome/browser/chromeos/app_mode/arc/arc_kiosk_app_launcher.h" 9 #include "chrome/browser/chromeos/app_mode/arc/arc_kiosk_app_launcher.h"
10 #include "chrome/browser/chromeos/app_mode/arc/arc_kiosk_app_manager.h" 10 #include "chrome/browser/chromeos/app_mode/arc/arc_kiosk_app_manager.h"
(...skipping 24 matching lines...) Expand all
35 void OnAppReadyChanged(const std::string& id, bool ready) override; 35 void OnAppReadyChanged(const std::string& id, bool ready) override;
36 void OnTaskCreated(int32_t task_id, 36 void OnTaskCreated(int32_t task_id,
37 const std::string& package_name, 37 const std::string& package_name,
38 const std::string& activity) override; 38 const std::string& activity) override;
39 void OnTaskDestroyed(int32_t task_id) override; 39 void OnTaskDestroyed(int32_t task_id) override;
40 void OnPackageListInitialRefreshed() override; 40 void OnPackageListInitialRefreshed() override;
41 41
42 // ArcKioskAppManager::Observer overrides 42 // ArcKioskAppManager::Observer overrides
43 void OnArcKioskAppsChanged() override; 43 void OnArcKioskAppsChanged() override;
44 44
45 void MaintenanceSessionCreated();
46 void MaintenanceSessionFinished();
47
45 private: 48 private:
46 ArcKioskAppService(Profile* profile, ArcAppListPrefs* prefs); 49 ArcKioskAppService(Profile* profile, ArcAppListPrefs* prefs);
47 ~ArcKioskAppService() override; 50 ~ArcKioskAppService() override;
48 51
49 std::string GetAppId(); 52 std::string GetAppId();
50 // Called when app should be started or stopped. 53 // Called when app should be started or stopped.
51 void PreconditionsChanged(); 54 void PreconditionsChanged();
52 55
53 Profile* const profile_; 56 Profile* const profile_;
54 ArcAppListPrefs* const prefs_; 57 ArcAppListPrefs* const prefs_;
58 bool maintenance_session_running_;
55 ArcKioskAppManager* app_manager_; 59 ArcKioskAppManager* app_manager_;
56 std::string app_id_; 60 std::string app_id_;
57 std::unique_ptr<ArcAppListPrefs::AppInfo> app_info_; 61 std::unique_ptr<ArcAppListPrefs::AppInfo> app_info_;
58 int32_t task_id_ = -1; 62 int32_t task_id_ = -1;
59 std::unique_ptr<PrefChangeRegistrar> pref_change_registrar_; 63 std::unique_ptr<PrefChangeRegistrar> pref_change_registrar_;
60 // Keeps track whether the app is already launched 64 // Keeps track whether the app is already launched
61 std::unique_ptr<ArcKioskAppLauncher> app_launcher_; 65 std::unique_ptr<ArcKioskAppLauncher> app_launcher_;
62 66
63 DISALLOW_COPY_AND_ASSIGN(ArcKioskAppService); 67 DISALLOW_COPY_AND_ASSIGN(ArcKioskAppService);
64 }; 68 };
65 69
66 } // namespace chromeos 70 } // namespace chromeos
67 71
68 #endif // CHROME_BROWSER_CHROMEOS_APP_MODE_ARC_ARC_KIOSK_APP_SERVICE_H_ 72 #endif // CHROME_BROWSER_CHROMEOS_APP_MODE_ARC_ARC_KIOSK_APP_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698