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

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

Issue 335003003: Introduces AppActivity and handler of chrome.shell API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: AppWindowOwner 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
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 "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/main/athena_app_window_controller.h"
11 #include "athena/main/athena_launcher.h" 12 #include "athena/main/athena_launcher.h"
12 #include "athena/main/placeholder.h" 13 #include "athena/main/placeholder.h"
13 #include "base/command_line.h" 14 #include "base/command_line.h"
14 #include "base/file_util.h" 15 #include "base/file_util.h"
15 #include "content/public/app/content_main.h" 16 #include "content/public/app/content_main.h"
16 #include "ui/aura/window_tree_host.h" 17 #include "ui/aura/window_tree_host.h"
17 #include "ui/wm/core/visibility_controller.h" 18 #include "ui/wm/core/visibility_controller.h"
18 19
19 namespace { 20 namespace {
20 const std::string kAppSwitch = "app"; 21 const std::string kAppSwitch = "app";
(...skipping 20 matching lines...) Expand all
41 extension_system->LoadApp(app_absolute_dir); 42 extension_system->LoadApp(app_absolute_dir);
42 } 43 }
43 CreateTestPages(context); 44 CreateTestPages(context);
44 } 45 }
45 46
46 virtual void Shutdown() OVERRIDE { athena::ShutdownAthena(); } 47 virtual void Shutdown() OVERRIDE { athena::ShutdownAthena(); }
47 48
48 virtual apps::ShellDesktopController* CreateDesktopController() OVERRIDE { 49 virtual apps::ShellDesktopController* CreateDesktopController() OVERRIDE {
49 // TODO(mukai): create Athena's own ShellDesktopController subclass so that 50 // TODO(mukai): create Athena's own ShellDesktopController subclass so that
50 // it can initialize its own window manager logic. 51 // it can initialize its own window manager logic.
51 return new apps::ShellDesktopController(); 52 apps::ShellDesktopController* desktop = new apps::ShellDesktopController();
53 desktop->SetAppWindowController(new athena::AthenaAppWindowController());
54 return desktop;
52 } 55 }
53 56
54 private: 57 private:
55 DISALLOW_COPY_AND_ASSIGN(AthenaBrowserMainDelegate); 58 DISALLOW_COPY_AND_ASSIGN(AthenaBrowserMainDelegate);
56 }; 59 };
57 60
58 class AthenaMainDelegate : public apps::ShellMainDelegate { 61 class AthenaMainDelegate : public apps::ShellMainDelegate {
59 public: 62 public:
60 AthenaMainDelegate() {} 63 AthenaMainDelegate() {}
61 virtual ~AthenaMainDelegate() {} 64 virtual ~AthenaMainDelegate() {}
(...skipping 10 matching lines...) Expand all
72 75
73 int main(int argc, const char** argv) { 76 int main(int argc, const char** argv) {
74 AthenaMainDelegate delegate; 77 AthenaMainDelegate delegate;
75 content::ContentMainParams params(&delegate); 78 content::ContentMainParams params(&delegate);
76 79
77 params.argc = argc; 80 params.argc = argc;
78 params.argv = argv; 81 params.argv = argv;
79 82
80 return content::ContentMain(params); 83 return content::ContentMain(params);
81 } 84 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698