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 "athena/content/public/content_activity_factory.h" | 8 #include "athena/content/public/content_activity_factory.h" |
9 #include "athena/main/athena_launcher.h" | 9 #include "athena/main/athena_launcher.h" |
10 #include "athena/main/placeholder.h" | 10 #include "athena/main/placeholder.h" |
11 #include "athena/main/placeholder_content.h" | |
12 #include "content/public/app/content_main.h" | 11 #include "content/public/app/content_main.h" |
13 #include "ui/aura/window_tree_host.h" | 12 #include "ui/aura/window_tree_host.h" |
14 #include "ui/wm/core/visibility_controller.h" | 13 #include "ui/wm/core/visibility_controller.h" |
15 | 14 |
16 class AthenaBrowserMainDelegate : public apps::ShellBrowserMainDelegate { | 15 class AthenaBrowserMainDelegate : public apps::ShellBrowserMainDelegate { |
17 public: | 16 public: |
18 AthenaBrowserMainDelegate() {} | 17 AthenaBrowserMainDelegate() {} |
19 virtual ~AthenaBrowserMainDelegate() {} | 18 virtual ~AthenaBrowserMainDelegate() {} |
20 | 19 |
21 // apps::ShellBrowserMainDelegate: | 20 // apps::ShellBrowserMainDelegate: |
22 virtual void Start(content::BrowserContext* context) OVERRIDE { | 21 virtual void Start(content::BrowserContext* context) OVERRIDE { |
23 athena::StartAthena( | 22 athena::StartAthena( |
24 apps::ShellDesktopController::instance()->host()->window(), | 23 apps::ShellDesktopController::instance()->host()->window(), |
25 new athena::ContentActivityFactory()); | 24 new athena::ContentActivityFactory()); |
26 CreateTestWindows(); | |
27 CreateTestPages(context); | 25 CreateTestPages(context); |
28 } | 26 } |
29 | 27 |
30 virtual void Shutdown() OVERRIDE { athena::ShutdownAthena(); } | 28 virtual void Shutdown() OVERRIDE { athena::ShutdownAthena(); } |
31 | 29 |
32 virtual apps::ShellDesktopController* CreateDesktopController() OVERRIDE { | 30 virtual apps::ShellDesktopController* CreateDesktopController() OVERRIDE { |
33 // TODO(mukai): create Athena's own ShellDesktopController subclass so that | 31 // TODO(mukai): create Athena's own ShellDesktopController subclass so that |
34 // it can initialize its own window manager logic. | 32 // it can initialize its own window manager logic. |
35 return new apps::ShellDesktopController(); | 33 return new apps::ShellDesktopController(); |
36 } | 34 } |
(...skipping 19 matching lines...) Expand all Loading... |
56 | 54 |
57 int main(int argc, const char** argv) { | 55 int main(int argc, const char** argv) { |
58 AthenaMainDelegate delegate; | 56 AthenaMainDelegate delegate; |
59 content::ContentMainParams params(&delegate); | 57 content::ContentMainParams params(&delegate); |
60 | 58 |
61 params.argc = argc; | 59 params.argc = argc; |
62 params.argv = argv; | 60 params.argv = argv; |
63 | 61 |
64 return content::ContentMain(params); | 62 return content::ContentMain(params); |
65 } | 63 } |
OLD | NEW |