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 { | 12 namespace base { |
13 class FilePath; | 13 class FilePath; |
14 } | 14 } |
15 | 15 |
16 namespace content { | 16 namespace content { |
17 class BrowserContext; | 17 class BrowserContext; |
18 } | 18 } |
19 | 19 |
20 namespace extensions { | 20 namespace extensions { |
21 | 21 |
22 class EventRouter; | 22 class EventRouter; |
| 23 class InfoMap; |
23 class LazyBackgroundTaskQueue; | 24 class LazyBackgroundTaskQueue; |
24 class ProcessManager; | 25 class ProcessManager; |
25 | 26 |
26 // A simplified version of ExtensionSystem for app_shell. Allows | 27 // A simplified version of ExtensionSystem for app_shell. Allows |
27 // app_shell to skip initialization of services it doesn't need. | 28 // app_shell to skip initialization of services it doesn't need. |
28 class ShellExtensionSystem : public ExtensionSystem { | 29 class ShellExtensionSystem : public ExtensionSystem { |
29 public: | 30 public: |
30 explicit ShellExtensionSystem(content::BrowserContext* browser_context); | 31 explicit ShellExtensionSystem(content::BrowserContext* browser_context); |
31 virtual ~ShellExtensionSystem(); | 32 virtual ~ShellExtensionSystem(); |
32 | 33 |
(...skipping 23 matching lines...) Expand all Loading... |
56 virtual void RegisterExtensionWithRequestContexts( | 57 virtual void RegisterExtensionWithRequestContexts( |
57 const Extension* extension) OVERRIDE; | 58 const Extension* extension) OVERRIDE; |
58 virtual void UnregisterExtensionWithRequestContexts( | 59 virtual void UnregisterExtensionWithRequestContexts( |
59 const std::string& extension_id, | 60 const std::string& extension_id, |
60 const UnloadedExtensionInfo::Reason reason) OVERRIDE; | 61 const UnloadedExtensionInfo::Reason reason) OVERRIDE; |
61 virtual const OneShotEvent& ready() const OVERRIDE; | 62 virtual const OneShotEvent& ready() const OVERRIDE; |
62 | 63 |
63 private: | 64 private: |
64 content::BrowserContext* browser_context_; // Not owned. | 65 content::BrowserContext* browser_context_; // Not owned. |
65 | 66 |
| 67 // Data to be accessed on the IO thread. Must outlive process_manager_. |
| 68 scoped_refptr<InfoMap> info_map_; |
| 69 |
66 scoped_ptr<LazyBackgroundTaskQueue> lazy_background_task_queue_; | 70 scoped_ptr<LazyBackgroundTaskQueue> lazy_background_task_queue_; |
67 scoped_ptr<EventRouter> event_router_; | 71 scoped_ptr<EventRouter> event_router_; |
68 scoped_ptr<ProcessManager> process_manager_; | 72 scoped_ptr<ProcessManager> process_manager_; |
69 | 73 |
70 // Signaled when the extension system has completed its startup tasks. | 74 // Signaled when the extension system has completed its startup tasks. |
71 OneShotEvent ready_; | 75 OneShotEvent ready_; |
72 | 76 |
73 DISALLOW_COPY_AND_ASSIGN(ShellExtensionSystem); | 77 DISALLOW_COPY_AND_ASSIGN(ShellExtensionSystem); |
74 }; | 78 }; |
75 | 79 |
76 } // namespace extensions | 80 } // namespace extensions |
77 | 81 |
78 #endif // APPS_SHELL_SHELL_EXTENSION_SYSTEM_H_ | 82 #endif // APPS_SHELL_SHELL_EXTENSION_SYSTEM_H_ |
OLD | NEW |