| 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/extensions/public/extensions_delegate.h" |
| 6 #include "athena/main/athena_app_window_controller.h" | 7 #include "athena/main/athena_app_window_controller.h" |
| 7 #include "athena/main/athena_launcher.h" | 8 #include "athena/main/athena_launcher.h" |
| 8 #include "athena/screen/public/screen_manager.h" | 9 #include "athena/screen/public/screen_manager.h" |
| 9 #include "athena/screen/public/screen_manager_delegate.h" | 10 #include "athena/screen/public/screen_manager_delegate.h" |
| 10 #include "base/command_line.h" | 11 #include "base/command_line.h" |
| 11 #include "base/file_util.h" | 12 #include "base/file_util.h" |
| 12 #include "base/path_service.h" | 13 #include "base/path_service.h" |
| 13 #include "content/public/app/content_main.h" | 14 #include "content/public/app/content_main.h" |
| 14 #include "content/public/browser/browser_thread.h" | 15 #include "content/public/browser/browser_thread.h" |
| 15 #include "extensions/shell/app/shell_main_delegate.h" | 16 #include "extensions/shell/app/shell_main_delegate.h" |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 } | 92 } |
| 92 | 93 |
| 93 extensions::ShellDesktopController* desktop_controller = | 94 extensions::ShellDesktopController* desktop_controller = |
| 94 extensions::ShellDesktopController::instance(); | 95 extensions::ShellDesktopController::instance(); |
| 95 screen_manager_delegate_.reset( | 96 screen_manager_delegate_.reset( |
| 96 new AthenaScreenManagerDelegate(desktop_controller)); | 97 new AthenaScreenManagerDelegate(desktop_controller)); |
| 97 athena::StartAthenaEnv(desktop_controller->host()->window(), | 98 athena::StartAthenaEnv(desktop_controller->host()->window(), |
| 98 screen_manager_delegate_.get(), | 99 screen_manager_delegate_.get(), |
| 99 content::BrowserThread::GetMessageLoopProxyForThread( | 100 content::BrowserThread::GetMessageLoopProxyForThread( |
| 100 content::BrowserThread::FILE)); | 101 content::BrowserThread::FILE)); |
| 102 athena::ExtensionsDelegate::CreateExtensionsDelegateForShell(context); |
| 101 athena::StartAthenaSessionWithContext(context); | 103 athena::StartAthenaSessionWithContext(context); |
| 102 } | 104 } |
| 103 | 105 |
| 104 virtual void Shutdown() OVERRIDE { | 106 virtual void Shutdown() OVERRIDE { |
| 105 athena::ShutdownAthena(); | 107 athena::ShutdownAthena(); |
| 106 } | 108 } |
| 107 | 109 |
| 108 virtual extensions::ShellDesktopController* CreateDesktopController() | 110 virtual extensions::ShellDesktopController* CreateDesktopController() |
| 109 OVERRIDE { | 111 OVERRIDE { |
| 110 // TODO(mukai): create Athena's own ShellDesktopController subclass so that | 112 // TODO(mukai): create Athena's own ShellDesktopController subclass so that |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 163 | 165 |
| 164 int main(int argc, const char** argv) { | 166 int main(int argc, const char** argv) { |
| 165 AthenaMainDelegate delegate; | 167 AthenaMainDelegate delegate; |
| 166 content::ContentMainParams params(&delegate); | 168 content::ContentMainParams params(&delegate); |
| 167 | 169 |
| 168 params.argc = argc; | 170 params.argc = argc; |
| 169 params.argv = argv; | 171 params.argv = argv; |
| 170 | 172 |
| 171 return content::ContentMain(params); | 173 return content::ContentMain(params); |
| 172 } | 174 } |
| OLD | NEW |