| 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 24 matching lines...) Expand all Loading... |
| 46 athena::HomeCard::Get()->RegisterSearchProvider( | 47 athena::HomeCard::Get()->RegisterSearchProvider( |
| 47 new athena::UrlSearchProvider(context)); | 48 new athena::UrlSearchProvider(context)); |
| 48 CreateTestPages(context); | 49 CreateTestPages(context); |
| 49 } | 50 } |
| 50 | 51 |
| 51 virtual void Shutdown() OVERRIDE { athena::ShutdownAthena(); } | 52 virtual void Shutdown() OVERRIDE { athena::ShutdownAthena(); } |
| 52 | 53 |
| 53 virtual apps::ShellDesktopController* CreateDesktopController() OVERRIDE { | 54 virtual apps::ShellDesktopController* CreateDesktopController() OVERRIDE { |
| 54 // TODO(mukai): create Athena's own ShellDesktopController subclass so that | 55 // TODO(mukai): create Athena's own ShellDesktopController subclass so that |
| 55 // it can initialize its own window manager logic. | 56 // it can initialize its own window manager logic. |
| 56 return new apps::ShellDesktopController(); | 57 apps::ShellDesktopController* desktop = new apps::ShellDesktopController(); |
| 58 desktop->SetAppWindowController(new athena::AthenaAppWindowController()); |
| 59 return desktop; |
| 57 } | 60 } |
| 58 | 61 |
| 59 private: | 62 private: |
| 60 DISALLOW_COPY_AND_ASSIGN(AthenaBrowserMainDelegate); | 63 DISALLOW_COPY_AND_ASSIGN(AthenaBrowserMainDelegate); |
| 61 }; | 64 }; |
| 62 | 65 |
| 63 class AthenaMainDelegate : public apps::ShellMainDelegate { | 66 class AthenaMainDelegate : public apps::ShellMainDelegate { |
| 64 public: | 67 public: |
| 65 AthenaMainDelegate() {} | 68 AthenaMainDelegate() {} |
| 66 virtual ~AthenaMainDelegate() {} | 69 virtual ~AthenaMainDelegate() {} |
| (...skipping 10 matching lines...) Expand all Loading... |
| 77 | 80 |
| 78 int main(int argc, const char** argv) { | 81 int main(int argc, const char** argv) { |
| 79 AthenaMainDelegate delegate; | 82 AthenaMainDelegate delegate; |
| 80 content::ContentMainParams params(&delegate); | 83 content::ContentMainParams params(&delegate); |
| 81 | 84 |
| 82 params.argc = argc; | 85 params.argc = argc; |
| 83 params.argv = argv; | 86 params.argv = argv; |
| 84 | 87 |
| 85 return content::ContentMain(params); | 88 return content::ContentMain(params); |
| 86 } | 89 } |
| OLD | NEW |