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/browser/install/extension_install_ui.h" |
7 #include "extensions/common/extension_set.h" | 8 #include "extensions/common/extension_set.h" |
8 | 9 |
9 namespace athena { | 10 namespace athena { |
10 namespace { | 11 namespace { |
11 | 12 |
12 class TestExtensionsDelegate : public ExtensionsDelegate { | 13 class TestExtensionsDelegate : public ExtensionsDelegate { |
13 public: | 14 public: |
14 TestExtensionsDelegate() {} | 15 TestExtensionsDelegate() {} |
15 | 16 |
16 virtual ~TestExtensionsDelegate() {} | 17 virtual ~TestExtensionsDelegate() {} |
17 | 18 |
18 private: | 19 private: |
19 // ExtensionsDelegate: | 20 // ExtensionsDelegate: |
20 virtual content::BrowserContext* GetBrowserContext() const override { | 21 virtual content::BrowserContext* GetBrowserContext() const override { |
21 return NULL; | 22 return NULL; |
22 } | 23 } |
23 virtual const extensions::ExtensionSet& GetInstalledExtensions() override { | 24 virtual const extensions::ExtensionSet& GetInstalledExtensions() override { |
24 return shell_extensions_; | 25 return shell_extensions_; |
25 } | 26 } |
26 virtual bool LaunchApp(const std::string& app_id) override { return true; } | 27 virtual bool LaunchApp(const std::string& app_id) override { return true; } |
27 virtual bool UnloadApp(const std::string& app_id) override { return false; } | 28 virtual bool UnloadApp(const std::string& app_id) override { return false; } |
28 | 29 |
| 30 virtual scoped_ptr<extensions::ExtensionInstallUI> CreateExtensionInstallUI() |
| 31 override { |
| 32 return scoped_ptr<extensions::ExtensionInstallUI>(); |
| 33 } |
| 34 |
29 extensions::ExtensionSet shell_extensions_; | 35 extensions::ExtensionSet shell_extensions_; |
30 | 36 |
31 DISALLOW_COPY_AND_ASSIGN(TestExtensionsDelegate); | 37 DISALLOW_COPY_AND_ASSIGN(TestExtensionsDelegate); |
32 }; | 38 }; |
33 | 39 |
34 } // namespace | 40 } // namespace |
35 | 41 |
36 // static | 42 // static |
37 void ExtensionsDelegate::CreateExtensionsDelegateForTest() { | 43 void ExtensionsDelegate::CreateExtensionsDelegateForTest() { |
38 new TestExtensionsDelegate(); | 44 new TestExtensionsDelegate(); |
39 } | 45 } |
40 | 46 |
41 } // namespace athena | 47 } // namespace athena |
OLD | NEW |