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

Side by Side Diff: chrome/browser/chromeos/app_mode/kiosk_app_manager.h

Issue 2132663002: kiosk: Add status report for os update and running app (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: move clean up code from TearDown to dtor since set up code is in ctor now and fix DeviceStatusColle… Created 4 years, 5 months 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_KIOSK_APP_MANAGER_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_APP_MODE_KIOSK_APP_MANAGER_H_
6 #define CHROME_BROWSER_CHROMEOS_APP_MODE_KIOSK_APP_MANAGER_H_ 6 #define CHROME_BROWSER_CHROMEOS_APP_MODE_KIOSK_APP_MANAGER_H_
7 7
8 #include <map> 8 #include <map>
9 #include <memory> 9 #include <memory>
10 #include <string> 10 #include <string>
11 #include <vector> 11 #include <vector>
12 12
13 #include "base/callback_forward.h" 13 #include "base/callback_forward.h"
14 #include "base/lazy_instance.h" 14 #include "base/lazy_instance.h"
15 #include "base/macros.h" 15 #include "base/macros.h"
16 #include "base/observer_list.h" 16 #include "base/observer_list.h"
17 #include "base/time/time.h" 17 #include "base/time/time.h"
18 #include "chrome/browser/chromeos/app_mode/kiosk_app_data_delegate.h" 18 #include "chrome/browser/chromeos/app_mode/kiosk_app_data_delegate.h"
19 #include "chrome/browser/chromeos/extensions/external_cache.h" 19 #include "chrome/browser/chromeos/extensions/external_cache.h"
20 #include "chrome/browser/chromeos/policy/enterprise_install_attributes.h" 20 #include "chrome/browser/chromeos/policy/enterprise_install_attributes.h"
21 #include "chrome/browser/chromeos/settings/cros_settings.h" 21 #include "chrome/browser/chromeos/settings/cros_settings.h"
22 #include "components/signin/core/account_id/account_id.h" 22 #include "components/signin/core/account_id/account_id.h"
23 #include "ui/gfx/image/image_skia.h" 23 #include "ui/gfx/image/image_skia.h"
24 24
25 class GURL;
25 class PrefRegistrySimple; 26 class PrefRegistrySimple;
26 class Profile; 27 class Profile;
27 28
28 namespace base { 29 namespace base {
29 class RefCountedString; 30 class RefCountedString;
30 } 31 }
31 32
32 namespace extensions { 33 namespace extensions {
33 class Extension; 34 class Extension;
34 class ExternalLoader; 35 class ExternalLoader;
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 228
228 // Notifies the KioskAppManager that a given app was auto-launched 229 // Notifies the KioskAppManager that a given app was auto-launched
229 // automatically with no delay on startup. Certain privacy-sensitive 230 // automatically with no delay on startup. Certain privacy-sensitive
230 // kiosk-mode behavior (such as network reporting) is only enabled for 231 // kiosk-mode behavior (such as network reporting) is only enabled for
231 // kiosk apps that are immediately auto-launched on startup. 232 // kiosk apps that are immediately auto-launched on startup.
232 void SetAppWasAutoLaunchedWithZeroDelay(const std::string& app_id); 233 void SetAppWasAutoLaunchedWithZeroDelay(const std::string& app_id);
233 234
234 // Initialize |app_session_|. 235 // Initialize |app_session_|.
235 void InitSession(Profile* profile, const std::string& app_id); 236 void InitSession(Profile* profile, const std::string& app_id);
236 237
238 // Adds an app with the given meta data directly and skips meta data fetching
239 // for test.
240 void AddAppForTest(const std::string& app_id,
241 const AccountId& account_id,
242 const GURL& update_url,
243 const std::string& required_platform_version);
244
237 AppSession* app_session() { return app_session_.get(); } 245 AppSession* app_session() { return app_session_.get(); }
238 bool external_loader_created() const { return external_loader_created_; } 246 bool external_loader_created() const { return external_loader_created_; }
239 bool secondary_app_external_loader_created() const { 247 bool secondary_app_external_loader_created() const {
240 return secondary_app_external_loader_created_; 248 return secondary_app_external_loader_created_;
241 } 249 }
242 250
243 private: 251 private:
244 friend struct base::DefaultLazyInstanceTraits<KioskAppManager>; 252 friend struct base::DefaultLazyInstanceTraits<KioskAppManager>;
245 friend std::default_delete<KioskAppManager>; 253 friend std::default_delete<KioskAppManager>;
246 friend class KioskAppManagerTest; 254 friend class KioskAppManagerTest;
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
337 base::WeakPtr<KioskAppExternalLoader> secondary_app_external_loader_; 345 base::WeakPtr<KioskAppExternalLoader> secondary_app_external_loader_;
338 346
339 std::unique_ptr<AppSession> app_session_; 347 std::unique_ptr<AppSession> app_session_;
340 348
341 DISALLOW_COPY_AND_ASSIGN(KioskAppManager); 349 DISALLOW_COPY_AND_ASSIGN(KioskAppManager);
342 }; 350 };
343 351
344 } // namespace chromeos 352 } // namespace chromeos
345 353
346 #endif // CHROME_BROWSER_CHROMEOS_APP_MODE_KIOSK_APP_MANAGER_H_ 354 #endif // CHROME_BROWSER_CHROMEOS_APP_MODE_KIOSK_APP_MANAGER_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/app_mode/kiosk_app_data.cc ('k') | chrome/browser/chromeos/app_mode/kiosk_app_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698