OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 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 #include "athena/extensions/public/extensions_delegate.h" | 5 #include "athena/extensions/public/extensions_delegate.h" |
6 #include "base/macros.h" | 6 #include "base/macros.h" |
7 #include "extensions/common/extension_set.h" | 7 #include "extensions/common/extension_set.h" |
8 #include "extensions/shell/browser/shell_extension_system.h" | 8 #include "extensions/shell/browser/shell_extension_system.h" |
9 | 9 |
10 namespace athena { | 10 namespace athena { |
(...skipping 12 matching lines...) Expand all Loading... |
23 // ExtensionsDelegate: | 23 // ExtensionsDelegate: |
24 virtual content::BrowserContext* GetBrowserContext() const OVERRIDE { | 24 virtual content::BrowserContext* GetBrowserContext() const OVERRIDE { |
25 return context_; | 25 return context_; |
26 } | 26 } |
27 virtual const extensions::ExtensionSet& GetInstalledExtensions() OVERRIDE { | 27 virtual const extensions::ExtensionSet& GetInstalledExtensions() OVERRIDE { |
28 shell_extensions_.Clear(); | 28 shell_extensions_.Clear(); |
29 if (extension_system_->extension()) | 29 if (extension_system_->extension()) |
30 shell_extensions_.Insert(extension_system_->extension()); | 30 shell_extensions_.Insert(extension_system_->extension()); |
31 return shell_extensions_; | 31 return shell_extensions_; |
32 } | 32 } |
33 virtual void LaunchApp(const std::string& app_id) OVERRIDE { | 33 virtual bool LaunchApp(const std::string& app_id) OVERRIDE { |
34 extension_system_->LaunchApp(); | 34 extension_system_->LaunchApp(); |
| 35 return true; |
35 } | 36 } |
36 | 37 |
| 38 virtual bool UnloadApp(const std::string& app_id) OVERRIDE { return false; } |
| 39 |
37 content::BrowserContext* context_; | 40 content::BrowserContext* context_; |
38 extensions::ShellExtensionSystem* extension_system_; | 41 extensions::ShellExtensionSystem* extension_system_; |
39 extensions::ExtensionSet shell_extensions_; | 42 extensions::ExtensionSet shell_extensions_; |
40 | 43 |
41 DISALLOW_COPY_AND_ASSIGN(ShellExtensionsDelegate); | 44 DISALLOW_COPY_AND_ASSIGN(ShellExtensionsDelegate); |
42 }; | 45 }; |
43 | 46 |
44 } // namespace | 47 } // namespace |
45 | 48 |
46 // static | 49 // static |
47 void ExtensionsDelegate::CreateExtensionsDelegateForShell( | 50 void ExtensionsDelegate::CreateExtensionsDelegateForShell( |
48 content::BrowserContext* context) { | 51 content::BrowserContext* context) { |
49 new ShellExtensionsDelegate(context); | 52 new ShellExtensionsDelegate(context); |
50 } | 53 } |
51 | 54 |
52 } // namespace athena | 55 } // namespace athena |
OLD | NEW |