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 #include "athena/extensions/public/extensions_delegate.h"
6 #include "base/macros.h"
7 #include "extensions/browser/install/extension_install_ui.h"
8 #include "extensions/common/extension_set.h"
13 class TestExtensionsDelegate : public ExtensionsDelegate {
15 TestExtensionsDelegate() {}
17 ~TestExtensionsDelegate() override {}
20 // ExtensionsDelegate:
21 content::BrowserContext* GetBrowserContext() const override {
24 const extensions::ExtensionSet& GetInstalledExtensions() override {
25 return shell_extensions_;
27 bool LaunchApp(const std::string& app_id) override { return true; }
28 bool UnloadApp(const std::string& app_id) override { return false; }
30 scoped_ptr<extensions::ExtensionInstallUI> CreateExtensionInstallUI()
32 return scoped_ptr<extensions::ExtensionInstallUI>();
35 extensions::ExtensionSet shell_extensions_;
37 DISALLOW_COPY_AND_ASSIGN(TestExtensionsDelegate);
43 void ExtensionsDelegate::CreateExtensionsDelegateForTest() {
44 new TestExtensionsDelegate();