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/content/public/web_contents_view_delegate_creator.h" | 5 #include "athena/content/public/web_contents_view_delegate_creator.h" |
6 #include "athena/main/athena_app_window_controller.h" | 6 #include "athena/main/athena_app_window_controller.h" |
7 #include "athena/main/athena_launcher.h" | 7 #include "athena/main/athena_launcher.h" |
8 #include "athena/screen/public/screen_manager.h" | 8 #include "athena/screen/public/screen_manager.h" |
9 #include "athena/screen/public/screen_manager_delegate.h" | 9 #include "athena/screen/public/screen_manager_delegate.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
11 #include "base/file_util.h" | 11 #include "base/file_util.h" |
12 #include "base/path_service.h" | 12 #include "base/path_service.h" |
13 #include "content/public/app/content_main.h" | 13 #include "content/public/app/content_main.h" |
| 14 #include "content/public/browser/browser_thread.h" |
14 #include "extensions/shell/app/shell_main_delegate.h" | 15 #include "extensions/shell/app/shell_main_delegate.h" |
15 #include "extensions/shell/browser/shell_browser_main_delegate.h" | 16 #include "extensions/shell/browser/shell_browser_main_delegate.h" |
16 #include "extensions/shell/browser/shell_content_browser_client.h" | 17 #include "extensions/shell/browser/shell_content_browser_client.h" |
17 #include "extensions/shell/browser/shell_desktop_controller.h" | 18 #include "extensions/shell/browser/shell_desktop_controller.h" |
18 #include "extensions/shell/browser/shell_extension_system.h" | 19 #include "extensions/shell/browser/shell_extension_system.h" |
19 #include "extensions/shell/common/switches.h" | 20 #include "extensions/shell/common/switches.h" |
20 #include "ui/aura/window_tree_host.h" | 21 #include "ui/aura/window_tree_host.h" |
21 #include "ui/base/resource/resource_bundle.h" | 22 #include "ui/base/resource/resource_bundle.h" |
22 #include "ui/wm/core/visibility_controller.h" | 23 #include "ui/wm/core/visibility_controller.h" |
23 | 24 |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 static_cast<extensions::ShellExtensionSystem*>( | 88 static_cast<extensions::ShellExtensionSystem*>( |
88 extensions::ExtensionSystem::Get(context)); | 89 extensions::ExtensionSystem::Get(context)); |
89 extension_system->LoadApp(app_absolute_dir); | 90 extension_system->LoadApp(app_absolute_dir); |
90 } | 91 } |
91 | 92 |
92 extensions::ShellDesktopController* desktop_controller = | 93 extensions::ShellDesktopController* desktop_controller = |
93 extensions::ShellDesktopController::instance(); | 94 extensions::ShellDesktopController::instance(); |
94 screen_manager_delegate_.reset( | 95 screen_manager_delegate_.reset( |
95 new AthenaScreenManagerDelegate(desktop_controller)); | 96 new AthenaScreenManagerDelegate(desktop_controller)); |
96 athena::StartAthenaEnv(desktop_controller->host()->window(), | 97 athena::StartAthenaEnv(desktop_controller->host()->window(), |
97 screen_manager_delegate_.get()); | 98 screen_manager_delegate_.get(), |
| 99 content::BrowserThread::GetMessageLoopProxyForThread( |
| 100 content::BrowserThread::FILE)); |
98 athena::StartAthenaSessionWithContext(context); | 101 athena::StartAthenaSessionWithContext(context); |
99 } | 102 } |
100 | 103 |
101 virtual void Shutdown() OVERRIDE { | 104 virtual void Shutdown() OVERRIDE { |
102 athena::ShutdownAthena(); | 105 athena::ShutdownAthena(); |
103 } | 106 } |
104 | 107 |
105 virtual extensions::ShellDesktopController* CreateDesktopController() | 108 virtual extensions::ShellDesktopController* CreateDesktopController() |
106 OVERRIDE { | 109 OVERRIDE { |
107 // TODO(mukai): create Athena's own ShellDesktopController subclass so that | 110 // TODO(mukai): create Athena's own ShellDesktopController subclass so that |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
160 | 163 |
161 int main(int argc, const char** argv) { | 164 int main(int argc, const char** argv) { |
162 AthenaMainDelegate delegate; | 165 AthenaMainDelegate delegate; |
163 content::ContentMainParams params(&delegate); | 166 content::ContentMainParams params(&delegate); |
164 | 167 |
165 params.argc = argc; | 168 params.argc = argc; |
166 params.argv = argv; | 169 params.argv = argv; |
167 | 170 |
168 return content::ContentMain(params); | 171 return content::ContentMain(params); |
169 } | 172 } |
OLD | NEW |