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.
5 #ifndef ATHENA_EXTENSIONS_PUBLIC_EXTENSIONS_DELEGATE_H_
6 #define ATHENA_EXTENSIONS_PUBLIC_EXTENSIONS_DELEGATE_H_
10 #include "athena/athena_export.h"
17 namespace extensions
{
23 // A delegate interface to extension implentation.
24 class ATHENA_EXPORT ExtensionsDelegate
{
26 static ExtensionsDelegate
* Get(content::BrowserContext
* context
);
28 // Creates the extension delegate for app shell environment.
29 static void CreateExtensionsDelegateForShell(
30 content::BrowserContext
* context
);
32 // Creates the extension delegate for test environment.
33 static void CreateExtensionsDelegateForTest();
35 // Deletes the singleton instance. This must be called in the reverse
36 // order of the initialization.
37 static void Shutdown();
40 virtual ~ExtensionsDelegate();
42 virtual content::BrowserContext
* GetBrowserContext() const = 0;
44 // Returns the set of extensions that are currently installed.
45 virtual const extensions::ExtensionSet
& GetInstalledExtensions() = 0;
47 // Starts an application. Returns true if the application was
48 // successfully started.
49 virtual bool LaunchApp(const std::string
& app_id
) = 0;
51 // Unload an application. Returns true if the application was
52 // successfully unloaded.
53 virtual bool UnloadApp(const std::string
& app_id
) = 0;
58 #endif // ATHENA_EXTENSIONS_PUBLIC_EXTENSIONS_DELEGATE_H_