Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(9)

Side by Side Diff: athena/extensions/shell/extensions_delegate_impl.cc

Issue 501093003: Consolidate AppControllDelegate to ExtensionsDelegate (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
OLDNEW
« no previous file with comments | « athena/extensions/public/extensions_delegate.h ('k') | athena/extensions/test/test_extensions_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698