OLD | NEW |
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/activity/public/activity_factory.h" | 5 #include "athena/activity/public/activity_factory.h" |
6 #include "athena/activity/public/activity_manager.h" | 6 #include "athena/activity/public/activity_manager.h" |
7 #include "athena/content/public/web_contents_view_delegate_creator.h" | 7 #include "athena/content/public/web_contents_view_delegate_creator.h" |
8 #include "athena/env/public/athena_env.h" | 8 #include "athena/env/public/athena_env.h" |
| 9 #include "athena/extensions/public/extensions_delegate.h" |
| 10 #include "athena/main/athena_app_window_controller.h" |
9 #include "athena/main/athena_launcher.h" | 11 #include "athena/main/athena_launcher.h" |
10 #include "athena/screen/public/screen_manager.h" | 12 #include "athena/screen/public/screen_manager.h" |
11 #include "base/command_line.h" | 13 #include "base/command_line.h" |
12 #include "base/file_util.h" | 14 #include "base/file_util.h" |
13 #include "base/path_service.h" | 15 #include "base/path_service.h" |
14 #include "content/public/app/content_main.h" | 16 #include "content/public/app/content_main.h" |
15 #include "content/public/browser/browser_thread.h" | 17 #include "content/public/browser/browser_thread.h" |
16 #include "extensions/shell/app/shell_main_delegate.h" | 18 #include "extensions/shell/app/shell_main_delegate.h" |
17 #include "extensions/shell/browser/desktop_controller.h" | 19 #include "extensions/shell/browser/desktop_controller.h" |
18 #include "extensions/shell/browser/shell_app_window.h" | 20 #include "extensions/shell/browser/shell_app_window.h" |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 base::FilePath app_absolute_dir = base::MakeAbsoluteFilePath(app_dir); | 82 base::FilePath app_absolute_dir = base::MakeAbsoluteFilePath(app_dir); |
81 if (base::DirectoryExists(app_absolute_dir)) { | 83 if (base::DirectoryExists(app_absolute_dir)) { |
82 extensions::ShellExtensionSystem* extension_system = | 84 extensions::ShellExtensionSystem* extension_system = |
83 static_cast<extensions::ShellExtensionSystem*>( | 85 static_cast<extensions::ShellExtensionSystem*>( |
84 extensions::ExtensionSystem::Get(context)); | 86 extensions::ExtensionSystem::Get(context)); |
85 extension_system->LoadApp(app_absolute_dir); | 87 extension_system->LoadApp(app_absolute_dir); |
86 } | 88 } |
87 | 89 |
88 athena::StartAthenaEnv(content::BrowserThread::GetMessageLoopProxyForThread( | 90 athena::StartAthenaEnv(content::BrowserThread::GetMessageLoopProxyForThread( |
89 content::BrowserThread::FILE)); | 91 content::BrowserThread::FILE)); |
| 92 athena::ExtensionsDelegate::CreateExtensionsDelegateForShell(context); |
90 athena::StartAthenaSessionWithContext(context); | 93 athena::StartAthenaSessionWithContext(context); |
91 } | 94 } |
92 | 95 |
93 virtual void Shutdown() OVERRIDE { | 96 virtual void Shutdown() OVERRIDE { |
94 athena::ShutdownAthena(); | 97 athena::ShutdownAthena(); |
95 } | 98 } |
96 | 99 |
97 virtual extensions::DesktopController* CreateDesktopController() OVERRIDE { | 100 virtual extensions::DesktopController* CreateDesktopController() OVERRIDE { |
98 return new AthenaDesktopController(); | 101 return new AthenaDesktopController(); |
99 } | 102 } |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 | 148 |
146 int main(int argc, const char** argv) { | 149 int main(int argc, const char** argv) { |
147 AthenaMainDelegate delegate; | 150 AthenaMainDelegate delegate; |
148 content::ContentMainParams params(&delegate); | 151 content::ContentMainParams params(&delegate); |
149 | 152 |
150 params.argc = argc; | 153 params.argc = argc; |
151 params.argv = argv; | 154 params.argv = argv; |
152 | 155 |
153 return content::ContentMain(params); | 156 return content::ContentMain(params); |
154 } | 157 } |
OLD | NEW |