Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(268)

Side by Side Diff: athena/main/athena_main.cc

Issue 308783002: Removes the dependency to WMTestHelper from app shell. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « apps/shell/browser/shell_desktop_controller.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/main/athena_launcher.h" 8 #include "athena/main/athena_launcher.h"
9 #include "athena/main/placeholder.h" 9 #include "athena/main/placeholder.h"
10 #include "athena/main/placeholder_content.h" 10 #include "athena/main/placeholder_content.h"
11 #include "content/public/app/content_main.h" 11 #include "content/public/app/content_main.h"
12 #include "ui/aura/window_tree_host.h" 12 #include "ui/aura/window_tree_host.h"
13 #include "ui/wm/core/visibility_controller.h" 13 #include "ui/wm/core/visibility_controller.h"
14 14
15 class AthenaBrowserMainDelegate : public apps::ShellBrowserMainDelegate { 15 class AthenaBrowserMainDelegate : public apps::ShellBrowserMainDelegate {
16 public: 16 public:
17 AthenaBrowserMainDelegate() {} 17 AthenaBrowserMainDelegate() {}
18 virtual ~AthenaBrowserMainDelegate() {} 18 virtual ~AthenaBrowserMainDelegate() {}
19 19
20 // apps::ShellBrowserMainDelegate: 20 // apps::ShellBrowserMainDelegate:
21 virtual void Start(content::BrowserContext* context) OVERRIDE { 21 virtual void Start(content::BrowserContext* context) OVERRIDE {
22 athena::StartAthena(apps::ShellDesktopController::instance() 22 athena::StartAthena(
23 ->GetWindowTreeHost() 23 apps::ShellDesktopController::instance()->host()->window());
24 ->window());
25 CreateTestWindows(); 24 CreateTestWindows();
26 CreateTestPages(context); 25 CreateTestPages(context);
27 } 26 }
28 27
29 virtual void Shutdown() OVERRIDE { athena::ShutdownAthena(); } 28 virtual void Shutdown() OVERRIDE { athena::ShutdownAthena(); }
30 29
30 virtual apps::ShellDesktopController* CreateDesktopController() OVERRIDE {
31 // TODO(mukai): create Athena's own ShellDesktopController subclass so that
32 // it can initialize its own window manager logic.
33 return new apps::ShellDesktopController();
34 }
35
31 private: 36 private:
32 DISALLOW_COPY_AND_ASSIGN(AthenaBrowserMainDelegate); 37 DISALLOW_COPY_AND_ASSIGN(AthenaBrowserMainDelegate);
33 }; 38 };
34 39
35 class AthenaMainDelegate : public apps::ShellMainDelegate { 40 class AthenaMainDelegate : public apps::ShellMainDelegate {
36 public: 41 public:
37 AthenaMainDelegate() {} 42 AthenaMainDelegate() {}
38 virtual ~AthenaMainDelegate() {} 43 virtual ~AthenaMainDelegate() {}
39 44
40 private: 45 private:
41 // apps::ShellMainDelegate: 46 // apps::ShellMainDelegate:
42 virtual apps::ShellBrowserMainDelegate* CreateShellBrowserMainDelegate() 47 virtual apps::ShellBrowserMainDelegate* CreateShellBrowserMainDelegate()
43 OVERRIDE { 48 OVERRIDE {
44 return new AthenaBrowserMainDelegate(); 49 return new AthenaBrowserMainDelegate();
45 } 50 }
46 51
47 DISALLOW_COPY_AND_ASSIGN(AthenaMainDelegate); 52 DISALLOW_COPY_AND_ASSIGN(AthenaMainDelegate);
48 }; 53 };
49 54
50 int main(int argc, const char** argv) { 55 int main(int argc, const char** argv) {
51 AthenaMainDelegate delegate; 56 AthenaMainDelegate delegate;
52 content::ContentMainParams params(&delegate); 57 content::ContentMainParams params(&delegate);
53 58
54 params.argc = argc; 59 params.argc = argc;
55 params.argv = argv; 60 params.argv = argv;
56 61
57 return content::ContentMain(params); 62 return content::ContentMain(params);
58 } 63 }
OLDNEW
« no previous file with comments | « apps/shell/browser/shell_desktop_controller.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698