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" | 9 #include "athena/extensions/public/extensions_delegate.h" |
10 #include "athena/main/athena_content_client.h" | 10 #include "athena/main/athena_content_client.h" |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 : kDefaultAppPath); | 148 : kDefaultAppPath); |
149 | 149 |
150 base::FilePath app_absolute_dir = base::MakeAbsoluteFilePath(app_dir); | 150 base::FilePath app_absolute_dir = base::MakeAbsoluteFilePath(app_dir); |
151 if (base::DirectoryExists(app_absolute_dir)) { | 151 if (base::DirectoryExists(app_absolute_dir)) { |
152 extensions::ShellExtensionSystem* extension_system = | 152 extensions::ShellExtensionSystem* extension_system = |
153 static_cast<extensions::ShellExtensionSystem*>( | 153 static_cast<extensions::ShellExtensionSystem*>( |
154 extensions::ExtensionSystem::Get(context)); | 154 extensions::ExtensionSystem::Get(context)); |
155 extension_system->LoadApp(app_absolute_dir); | 155 extension_system->LoadApp(app_absolute_dir); |
156 } | 156 } |
157 | 157 |
158 athena::StartAthenaEnv(content::BrowserThread::GetMessageLoopProxyForThread( | 158 athena::StartAthenaEnv(content::BrowserThread::GetBlockingPool()-> |
159 content::BrowserThread::FILE)); | 159 GetTaskRunnerWithShutdownBehavior( |
| 160 base::SequencedWorkerPool::SKIP_ON_SHUTDOWN)); |
160 athena::ExtensionsDelegate::CreateExtensionsDelegateForShell(context); | 161 athena::ExtensionsDelegate::CreateExtensionsDelegateForShell(context); |
161 athena::CreateVirtualKeyboardWithContext(context); | 162 athena::CreateVirtualKeyboardWithContext(context); |
162 athena::StartAthenaSessionWithContext(context); | 163 athena::StartAthenaSessionWithContext(context); |
163 } | 164 } |
164 | 165 |
165 virtual void Shutdown() OVERRIDE { | 166 virtual void Shutdown() OVERRIDE { |
166 athena::AthenaEnv::Get()->OnTerminating(); | 167 athena::AthenaEnv::Get()->OnTerminating(); |
167 athena::ShutdownAthena(); | 168 athena::ShutdownAthena(); |
168 } | 169 } |
169 | 170 |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
251 | 252 |
252 int main(int argc, const char** argv) { | 253 int main(int argc, const char** argv) { |
253 AthenaMainDelegate delegate; | 254 AthenaMainDelegate delegate; |
254 content::ContentMainParams params(&delegate); | 255 content::ContentMainParams params(&delegate); |
255 | 256 |
256 params.argc = argc; | 257 params.argc = argc; |
257 params.argv = argv; | 258 params.argv = argv; |
258 | 259 |
259 return content::ContentMain(params); | 260 return content::ContentMain(params); |
260 } | 261 } |
OLD | NEW |