OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #ifndef APPS_SHELL_BROWSER_SHELL_EXTENSION_SYSTEM_H_ | 5 #ifndef APPS_SHELL_BROWSER_SHELL_EXTENSION_SYSTEM_H_ |
6 #define APPS_SHELL_BROWSER_SHELL_EXTENSION_SYSTEM_H_ | 6 #define APPS_SHELL_BROWSER_SHELL_EXTENSION_SYSTEM_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
(...skipping 18 matching lines...) Expand all Loading... |
29 class ProcessManager; | 29 class ProcessManager; |
30 class RendererStartupHelper; | 30 class RendererStartupHelper; |
31 | 31 |
32 // A simplified version of ExtensionSystem for app_shell. Allows | 32 // A simplified version of ExtensionSystem for app_shell. Allows |
33 // app_shell to skip initialization of services it doesn't need. | 33 // app_shell to skip initialization of services it doesn't need. |
34 class ShellExtensionSystem : public ExtensionSystem { | 34 class ShellExtensionSystem : public ExtensionSystem { |
35 public: | 35 public: |
36 explicit ShellExtensionSystem(content::BrowserContext* browser_context); | 36 explicit ShellExtensionSystem(content::BrowserContext* browser_context); |
37 virtual ~ShellExtensionSystem(); | 37 virtual ~ShellExtensionSystem(); |
38 | 38 |
39 // Returns the list of services on which |this| depends. | |
40 static std::vector<BrowserContextKeyedServiceFactory*> GetDependencies(); | |
41 | |
42 // Loads an unpacked application from a directory and attempts to launch it. | 39 // Loads an unpacked application from a directory and attempts to launch it. |
43 // Returns true on success. | 40 // Returns true on success. |
44 bool LoadAndLaunchApp(const base::FilePath& app_dir); | 41 bool LoadAndLaunchApp(const base::FilePath& app_dir); |
45 | 42 |
46 // BrowserContextKeyedService implementation: | 43 // BrowserContextKeyedService implementation: |
47 virtual void Shutdown() OVERRIDE; | 44 virtual void Shutdown() OVERRIDE; |
48 | 45 |
49 // ExtensionSystem implementation: | 46 // ExtensionSystem implementation: |
50 virtual void InitForRegularProfile(bool extensions_enabled) OVERRIDE; | 47 virtual void InitForRegularProfile(bool extensions_enabled) OVERRIDE; |
51 virtual ExtensionService* extension_service() OVERRIDE; | 48 virtual ExtensionService* extension_service() OVERRIDE; |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 | 82 |
86 // Signaled when the extension system has completed its startup tasks. | 83 // Signaled when the extension system has completed its startup tasks. |
87 OneShotEvent ready_; | 84 OneShotEvent ready_; |
88 | 85 |
89 DISALLOW_COPY_AND_ASSIGN(ShellExtensionSystem); | 86 DISALLOW_COPY_AND_ASSIGN(ShellExtensionSystem); |
90 }; | 87 }; |
91 | 88 |
92 } // namespace extensions | 89 } // namespace extensions |
93 | 90 |
94 #endif // APPS_SHELL_BROWSER_SHELL_EXTENSION_SYSTEM_H_ | 91 #endif // APPS_SHELL_BROWSER_SHELL_EXTENSION_SYSTEM_H_ |
OLD | NEW |