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_SHELL_EXTENSION_SYSTEM_H_ | 5 #ifndef APPS_SHELL_SHELL_EXTENSION_SYSTEM_H_ |
6 #define APPS_SHELL_SHELL_EXTENSION_SYSTEM_H_ | 6 #define APPS_SHELL_SHELL_EXTENSION_SYSTEM_H_ |
7 | 7 |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "chrome/browser/extensions/extension_system.h" | 9 #include "chrome/browser/extensions/extension_system.h" |
10 #include "extensions/common/one_shot_event.h" | 10 #include "extensions/common/one_shot_event.h" |
11 | 11 |
| 12 namespace base { |
| 13 class FilePath; |
| 14 } |
| 15 |
12 namespace content { | 16 namespace content { |
13 class BrowserContext; | 17 class BrowserContext; |
14 } | 18 } |
15 | 19 |
16 namespace extensions { | 20 namespace extensions { |
17 | 21 |
18 class EventRouter; | 22 class EventRouter; |
19 class LazyBackgroundTaskQueue; | 23 class LazyBackgroundTaskQueue; |
20 class ProcessManager; | 24 class ProcessManager; |
21 | 25 |
22 // A simplified version of ExtensionSystem for app_shell. Allows | 26 // A simplified version of ExtensionSystem for app_shell. Allows |
23 // app_shell to skip initialization of services it doesn't need. | 27 // app_shell to skip initialization of services it doesn't need. |
24 class ShellExtensionSystem : public ExtensionSystem { | 28 class ShellExtensionSystem : public ExtensionSystem { |
25 public: | 29 public: |
26 explicit ShellExtensionSystem(content::BrowserContext* browser_context); | 30 explicit ShellExtensionSystem(content::BrowserContext* browser_context); |
27 virtual ~ShellExtensionSystem(); | 31 virtual ~ShellExtensionSystem(); |
28 | 32 |
| 33 // Loads an unpacked application from a directory and attempts to launch it. |
| 34 // Returns true on success. |
| 35 bool LoadAndLaunchApp(const base::FilePath& app_dir); |
| 36 |
29 // BrowserContextKeyedService implementation: | 37 // BrowserContextKeyedService implementation: |
30 virtual void Shutdown() OVERRIDE; | 38 virtual void Shutdown() OVERRIDE; |
31 | 39 |
32 // ExtensionSystem implementation: | 40 // ExtensionSystem implementation: |
33 virtual void InitForRegularProfile(bool extensions_enabled) OVERRIDE; | 41 virtual void InitForRegularProfile(bool extensions_enabled) OVERRIDE; |
34 virtual ExtensionService* extension_service() OVERRIDE; | 42 virtual ExtensionService* extension_service() OVERRIDE; |
35 virtual ManagementPolicy* management_policy() OVERRIDE; | 43 virtual ManagementPolicy* management_policy() OVERRIDE; |
36 virtual UserScriptMaster* user_script_master() OVERRIDE; | 44 virtual UserScriptMaster* user_script_master() OVERRIDE; |
37 virtual ProcessManager* process_manager() OVERRIDE; | 45 virtual ProcessManager* process_manager() OVERRIDE; |
38 virtual StateStore* state_store() OVERRIDE; | 46 virtual StateStore* state_store() OVERRIDE; |
(...skipping 22 matching lines...) Expand all Loading... |
61 | 69 |
62 // Signaled when the extension system has completed its startup tasks. | 70 // Signaled when the extension system has completed its startup tasks. |
63 OneShotEvent ready_; | 71 OneShotEvent ready_; |
64 | 72 |
65 DISALLOW_COPY_AND_ASSIGN(ShellExtensionSystem); | 73 DISALLOW_COPY_AND_ASSIGN(ShellExtensionSystem); |
66 }; | 74 }; |
67 | 75 |
68 } // namespace extensions | 76 } // namespace extensions |
69 | 77 |
70 #endif // APPS_SHELL_SHELL_EXTENSION_SYSTEM_H_ | 78 #endif // APPS_SHELL_SHELL_EXTENSION_SYSTEM_H_ |
OLD | NEW |