Updating trunk VERSION from 2139.0 to 2140.0
[chromium-blink-merge.git] / athena / extensions / public / extensions_delegate.h
blob394ea827467e4b43a2d91b8ca3b21115c31961fa
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_
8 #include <string>
10 #include "athena/athena_export.h"
12 namespace content {
13 class BrowserContext;
14 class WebContents;
17 namespace extensions {
18 class ExtensionSet;
21 namespace athena {
23 // A delegate interface to extension implentation.
24 class ATHENA_EXPORT ExtensionsDelegate {
25 public:
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();
39 ExtensionsDelegate();
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;
56 } // namespace athena
58 #endif // ATHENA_EXTENSIONS_PUBLIC_EXTENSIONS_DELEGATE_H_