Updating trunk VERSION from 2139.0 to 2140.0
[chromium-blink-merge.git] / athena / extensions / test / test_extensions_delegate.cc
blobd22bf29430d69ebc4463bc115157bbf27aec713a
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/common/extension_set.h"
9 namespace athena {
10 namespace {
12 class TestExtensionsDelegate : public ExtensionsDelegate {
13 public:
14 TestExtensionsDelegate() {}
16 virtual ~TestExtensionsDelegate() {}
18 private:
19 // ExtensionsDelegate:
20 virtual content::BrowserContext* GetBrowserContext() const OVERRIDE {
21 return NULL;
23 virtual const extensions::ExtensionSet& GetInstalledExtensions() OVERRIDE {
24 return shell_extensions_;
26 virtual bool LaunchApp(const std::string& app_id) OVERRIDE { return true; }
27 virtual bool UnloadApp(const std::string& app_id) OVERRIDE { return false; }
29 extensions::ExtensionSet shell_extensions_;
31 DISALLOW_COPY_AND_ASSIGN(TestExtensionsDelegate);
34 } // namespace
36 // static
37 void ExtensionsDelegate::CreateExtensionsDelegateForTest() {
38 new TestExtensionsDelegate();
41 } // namespace athena