Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 ATHENA_EXTENSIONS_PUBLIC_EXTENSIONS_DELEGATE_H_ | |
| 6 #define ATHENA_EXTENSIONS_PUBLIC_EXTENSIONS_DELEGATE_H_ | |
| 7 | |
| 8 #include <string> | |
| 9 | |
| 10 #include "athena/athena_export.h" | |
| 11 | |
| 12 namespace content { | |
| 13 class BrowserContext; | |
| 14 } | |
| 15 | |
| 16 namespace extensions { | |
| 17 class ExtensionSet; | |
| 18 } | |
| 19 | |
| 20 namespace athena { | |
| 21 | |
| 22 // A delegate interface to extension implentation. | |
| 23 class ATHENA_EXPORT ExtensionsDelegate { | |
| 24 public: | |
| 25 static ExtensionsDelegate* Get(content::BrowserContext* context); | |
| 26 | |
| 27 // Initializes the extension delegate for app shell environment. | |
| 28 static void InitExtensionsDelegateForShell(content::BrowserContext* context); | |
| 29 | |
| 30 // Deletes the singleton instance. This must be called in the reverse | |
| 31 // order of the initialization. | |
| 32 static void Shutdown(); | |
| 33 | |
| 34 ExtensionsDelegate(); | |
| 35 virtual ~ExtensionsDelegate(); | |
| 36 | |
| 37 virtual content::BrowserContext* GetBrowserContext() const = 0; | |
| 38 | |
| 39 // Returns the set of extensions that are currently installed. | |
|
Yoyo Zhou
2014/08/21 22:40:29
I find the ownership here a little unintuitive, so
oshima
2014/08/21 23:22:57
Changed to const ExtensionSet& I think that's bett
| |
| 40 virtual extensions::ExtensionSet* GetInstalledExtensions() = 0; | |
| 41 | |
| 42 // Launch an application specified by |app_id|. | |
| 43 virtual void LaunchApp(const std::string& app_id) = 0; | |
| 44 }; | |
| 45 | |
| 46 } // namespace athena | |
| 47 | |
| 48 #endif // ATHENA_EXTENSIONS_PUBLIC_EXTENSIONS_DELEGATE_H_ | |
| OLD | NEW |