| 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 "apps/shell/app/shell_main_delegate.h" | 5 #include "apps/shell/app/shell_main_delegate.h" |
| 6 #include "apps/shell/browser/shell_browser_main_delegate.h" | 6 #include "apps/shell/browser/shell_browser_main_delegate.h" |
| 7 #include "apps/shell/browser/shell_desktop_controller.h" | 7 #include "apps/shell/browser/shell_desktop_controller.h" |
| 8 #include "apps/shell/browser/shell_extension_system.h" | 8 #include "apps/shell/browser/shell_extension_system.h" |
| 9 #include "athena/content/public/content_activity_factory.h" | 9 #include "athena/content/public/content_activity_factory.h" |
| 10 #include "athena/content/public/content_app_model_builder.h" | 10 #include "athena/content/public/content_app_model_builder.h" |
| 11 #include "athena/home/public/home_card.h" | 11 #include "athena/home/public/home_card.h" |
| 12 #include "athena/main/athena_app_window_controller.h" |
| 12 #include "athena/main/athena_launcher.h" | 13 #include "athena/main/athena_launcher.h" |
| 13 #include "athena/main/placeholder.h" | 14 #include "athena/main/placeholder.h" |
| 14 #include "athena/main/url_search_provider.h" | 15 #include "athena/main/url_search_provider.h" |
| 15 #include "base/command_line.h" | 16 #include "base/command_line.h" |
| 16 #include "base/file_util.h" | 17 #include "base/file_util.h" |
| 17 #include "content/public/app/content_main.h" | 18 #include "content/public/app/content_main.h" |
| 18 #include "ui/aura/window_tree_host.h" | 19 #include "ui/aura/window_tree_host.h" |
| 19 #include "ui/wm/core/visibility_controller.h" | 20 #include "ui/wm/core/visibility_controller.h" |
| 20 | 21 |
| 21 namespace { | 22 namespace { |
| (...skipping 23 matching lines...) Expand all Loading... |
| 45 extension_system->LoadApp(app_absolute_dir); | 46 extension_system->LoadApp(app_absolute_dir); |
| 46 } | 47 } |
| 47 CreateTestPages(context); | 48 CreateTestPages(context); |
| 48 } | 49 } |
| 49 | 50 |
| 50 virtual void Shutdown() OVERRIDE { athena::ShutdownAthena(); } | 51 virtual void Shutdown() OVERRIDE { athena::ShutdownAthena(); } |
| 51 | 52 |
| 52 virtual apps::ShellDesktopController* CreateDesktopController() OVERRIDE { | 53 virtual apps::ShellDesktopController* CreateDesktopController() OVERRIDE { |
| 53 // TODO(mukai): create Athena's own ShellDesktopController subclass so that | 54 // TODO(mukai): create Athena's own ShellDesktopController subclass so that |
| 54 // it can initialize its own window manager logic. | 55 // it can initialize its own window manager logic. |
| 55 return new apps::ShellDesktopController(); | 56 apps::ShellDesktopController* desktop = new apps::ShellDesktopController(); |
| 57 desktop->SetAppWindowController(new athena::AthenaAppWindowController()); |
| 58 return desktop; |
| 56 } | 59 } |
| 57 | 60 |
| 58 private: | 61 private: |
| 59 DISALLOW_COPY_AND_ASSIGN(AthenaBrowserMainDelegate); | 62 DISALLOW_COPY_AND_ASSIGN(AthenaBrowserMainDelegate); |
| 60 }; | 63 }; |
| 61 | 64 |
| 62 class AthenaMainDelegate : public apps::ShellMainDelegate { | 65 class AthenaMainDelegate : public apps::ShellMainDelegate { |
| 63 public: | 66 public: |
| 64 AthenaMainDelegate() {} | 67 AthenaMainDelegate() {} |
| 65 virtual ~AthenaMainDelegate() {} | 68 virtual ~AthenaMainDelegate() {} |
| (...skipping 10 matching lines...) Expand all Loading... |
| 76 | 79 |
| 77 int main(int argc, const char** argv) { | 80 int main(int argc, const char** argv) { |
| 78 AthenaMainDelegate delegate; | 81 AthenaMainDelegate delegate; |
| 79 content::ContentMainParams params(&delegate); | 82 content::ContentMainParams params(&delegate); |
| 80 | 83 |
| 81 params.argc = argc; | 84 params.argc = argc; |
| 82 params.argv = argv; | 85 params.argv = argv; |
| 83 | 86 |
| 84 return content::ContentMain(params); | 87 return content::ContentMain(params); |
| 85 } | 88 } |
| OLD | NEW |