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

Side by Side Diff: apps/shell/browser/shell_extension_system.h

Issue 313733005: Introduces --app flag to athena to load an app. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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 | Annotate | Revision Log
OLDNEW
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
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 // Loads an unpacked application from a directory and attempts to launch it. 39 // Runs LoadApp() and LaunchApp().
40 // Returns true on success.
41 bool LoadAndLaunchApp(const base::FilePath& app_dir); 40 bool LoadAndLaunchApp(const base::FilePath& app_dir);
42 41
42 // Loads an unpacked application from a directory. Returns true on success.
43 bool LoadApp(const base::FilePath& app_dir);
44
45 // Launch the currently loaded app.
46 void LaunchApp();
47
43 // KeyedService implementation: 48 // KeyedService implementation:
44 virtual void Shutdown() OVERRIDE; 49 virtual void Shutdown() OVERRIDE;
45 50
46 // ExtensionSystem implementation: 51 // ExtensionSystem implementation:
47 virtual void InitForRegularProfile(bool extensions_enabled) OVERRIDE; 52 virtual void InitForRegularProfile(bool extensions_enabled) OVERRIDE;
48 virtual ExtensionService* extension_service() OVERRIDE; 53 virtual ExtensionService* extension_service() OVERRIDE;
49 virtual RuntimeData* runtime_data() OVERRIDE; 54 virtual RuntimeData* runtime_data() OVERRIDE;
50 virtual ManagementPolicy* management_policy() OVERRIDE; 55 virtual ManagementPolicy* management_policy() OVERRIDE;
51 virtual UserScriptMaster* user_script_master() OVERRIDE; 56 virtual UserScriptMaster* user_script_master() OVERRIDE;
52 virtual ProcessManager* process_manager() OVERRIDE; 57 virtual ProcessManager* process_manager() OVERRIDE;
(...skipping 15 matching lines...) Expand all
68 const UnloadedExtensionInfo::Reason reason) OVERRIDE; 73 const UnloadedExtensionInfo::Reason reason) OVERRIDE;
69 virtual const OneShotEvent& ready() const OVERRIDE; 74 virtual const OneShotEvent& ready() const OVERRIDE;
70 virtual ContentVerifier* content_verifier() OVERRIDE; 75 virtual ContentVerifier* content_verifier() OVERRIDE;
71 76
72 private: 77 private:
73 content::BrowserContext* browser_context_; // Not owned. 78 content::BrowserContext* browser_context_; // Not owned.
74 79
75 // Extension ID for the app. 80 // Extension ID for the app.
76 std::string app_id_; 81 std::string app_id_;
77 82
83 scoped_refptr<Extension> extension_;
84
78 // Data to be accessed on the IO thread. Must outlive process_manager_. 85 // Data to be accessed on the IO thread. Must outlive process_manager_.
79 scoped_refptr<InfoMap> info_map_; 86 scoped_refptr<InfoMap> info_map_;
80 87
81 scoped_ptr<RuntimeData> runtime_data_; 88 scoped_ptr<RuntimeData> runtime_data_;
82 scoped_ptr<LazyBackgroundTaskQueue> lazy_background_task_queue_; 89 scoped_ptr<LazyBackgroundTaskQueue> lazy_background_task_queue_;
83 scoped_ptr<EventRouter> event_router_; 90 scoped_ptr<EventRouter> event_router_;
84 scoped_ptr<ProcessManager> process_manager_; 91 scoped_ptr<ProcessManager> process_manager_;
85 scoped_ptr<QuotaService> quota_service_; 92 scoped_ptr<QuotaService> quota_service_;
86 93
87 // Signaled when the extension system has completed its startup tasks. 94 // Signaled when the extension system has completed its startup tasks.
88 OneShotEvent ready_; 95 OneShotEvent ready_;
89 96
90 DISALLOW_COPY_AND_ASSIGN(ShellExtensionSystem); 97 DISALLOW_COPY_AND_ASSIGN(ShellExtensionSystem);
91 }; 98 };
92 99
93 } // namespace extensions 100 } // namespace extensions
94 101
95 #endif // APPS_SHELL_BROWSER_SHELL_EXTENSION_SYSTEM_H_ 102 #endif // APPS_SHELL_BROWSER_SHELL_EXTENSION_SYSTEM_H_
OLDNEW
« no previous file with comments | « no previous file | apps/shell/browser/shell_extension_system.cc » ('j') | apps/shell/browser/shell_extension_system.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698