1 // Copyright 2014 The Chromium Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 #ifndef CHROME_BROWSER_CHROMEOS_APP_MODE_KIOSK_APP_EXTERNAL_LOADER_H_ 6 #define CHROME_BROWSER_CHROMEOS_APP_MODE_KIOSK_APP_EXTERNAL_LOADER_H_ 7 8 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/weak_ptr.h" 10 #include "base/values.h" 11 #include "chrome/browser/extensions/external_loader.h" 12 13 namespace chromeos { 14 15 // A custom extensions::ExternalLoader that is created by KioskAppManager and 16 // used for install kiosk app extensions. 17 class KioskAppExternalLoader 18 : public extensions::ExternalLoader, 19 public base::SupportsWeakPtr<KioskAppExternalLoader> { 20 public: 21 KioskAppExternalLoader(); 22 23 // Sets current kiosk app extensions to be loaded. 24 void SetCurrentAppExtensions(scoped_ptr<base::DictionaryValue> prefs); 25 26 // extensions::ExternalLoader overrides: 27 virtual void StartLoading() OVERRIDE; 28 29 private: 30 virtual ~KioskAppExternalLoader(); 31 32 base::DictionaryValue kiosk_apps_; 33 34 DISALLOW_COPY_AND_ASSIGN(KioskAppExternalLoader); 35 }; 36 37 } // namespace chromeos 38 39 #endif // CHROME_BROWSER_CHROMEOS_APP_MODE_KIOSK_APP_EXTERNAL_LOADER_H_ 40