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 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 : kDefaultAppPath); | 135 : kDefaultAppPath); |
136 | 136 |
137 base::FilePath app_absolute_dir = base::MakeAbsoluteFilePath(app_dir); | 137 base::FilePath app_absolute_dir = base::MakeAbsoluteFilePath(app_dir); |
138 if (base::DirectoryExists(app_absolute_dir)) { | 138 if (base::DirectoryExists(app_absolute_dir)) { |
139 extensions::ShellExtensionSystem* extension_system = | 139 extensions::ShellExtensionSystem* extension_system = |
140 static_cast<extensions::ShellExtensionSystem*>( | 140 static_cast<extensions::ShellExtensionSystem*>( |
141 extensions::ExtensionSystem::Get(context)); | 141 extensions::ExtensionSystem::Get(context)); |
142 extension_system->LoadApp(app_absolute_dir); | 142 extension_system->LoadApp(app_absolute_dir); |
143 } | 143 } |
144 | 144 |
145 athena::StartAthenaEnv(content::BrowserThread::GetMessageLoopProxyForThread( | 145 athena::StartAthenaEnv(content::BrowserThread::GetBlockingPool()-> |
146 content::BrowserThread::FILE)); | 146 GetTaskRunnerWithShutdownBehavior( |
| 147 base::SequencedWorkerPool::SKIP_ON_SHUTDOWN)); |
147 athena::ExtensionsDelegate::CreateExtensionsDelegateForShell(context); | 148 athena::ExtensionsDelegate::CreateExtensionsDelegateForShell(context); |
148 athena::CreateVirtualKeyboardWithContext(context); | 149 athena::CreateVirtualKeyboardWithContext(context); |
149 athena::StartAthenaSessionWithContext(context); | 150 athena::StartAthenaSessionWithContext(context); |
150 } | 151 } |
151 | 152 |
152 virtual void Shutdown() OVERRIDE { | 153 virtual void Shutdown() OVERRIDE { |
153 athena::AthenaEnv::Get()->OnTerminating(); | 154 athena::AthenaEnv::Get()->OnTerminating(); |
154 athena::ShutdownAthena(); | 155 athena::ShutdownAthena(); |
155 } | 156 } |
156 | 157 |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
238 | 239 |
239 int main(int argc, const char** argv) { | 240 int main(int argc, const char** argv) { |
240 AthenaMainDelegate delegate; | 241 AthenaMainDelegate delegate; |
241 content::ContentMainParams params(&delegate); | 242 content::ContentMainParams params(&delegate); |
242 | 243 |
243 params.argc = argc; | 244 params.argc = argc; |
244 params.argv = argv; | 245 params.argv = argv; |
245 | 246 |
246 return content::ContentMain(params); | 247 return content::ContentMain(params); |
247 } | 248 } |
OLD | NEW |