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

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

Issue 302683002: athena: Add the concept of Activity and related managers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 7 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 "athena/home/public/home_card.h" 8 #include "athena/home/public/home_card.h"
9 #include "athena/main/placeholder.h" 9 #include "athena/main/placeholder.h"
10 #include "athena/screen/public/screen_manager.h" 10 #include "athena/screen/public/screen_manager.h"
11 #include "athena/task/public/task_manager.h"
11 #include "athena/wm/public/window_manager.h" 12 #include "athena/wm/public/window_manager.h"
12 #include "base/memory/scoped_ptr.h" 13 #include "base/memory/scoped_ptr.h"
13 #include "content/public/app/content_main.h" 14 #include "content/public/app/content_main.h"
14 #include "ui/aura/window_tree_host.h" 15 #include "ui/aura/window_tree_host.h"
15 #include "ui/wm/core/visibility_controller.h" 16 #include "ui/wm/core/visibility_controller.h"
16 17
17 class AthenaBrowserMainDelegate : public apps::ShellBrowserMainDelegate { 18 class AthenaBrowserMainDelegate : public apps::ShellBrowserMainDelegate {
18 public: 19 public:
19 AthenaBrowserMainDelegate() {} 20 AthenaBrowserMainDelegate() {}
20 virtual ~AthenaBrowserMainDelegate() {} 21 virtual ~AthenaBrowserMainDelegate() {}
21 22
22 // apps::ShellBrowserMainDelegate: 23 // apps::ShellBrowserMainDelegate:
23 virtual void Start(content::BrowserContext* context) OVERRIDE { 24 virtual void Start(content::BrowserContext* context) OVERRIDE {
24 aura::Window* root_window = 25 aura::Window* root_window =
25 apps::ShellDesktopController::instance()->GetWindowTreeHost()->window(); 26 apps::ShellDesktopController::instance()->GetWindowTreeHost()->window();
26 visibility_controller_.reset(new ::wm::VisibilityController); 27 visibility_controller_.reset(new ::wm::VisibilityController);
27 aura::client::SetVisibilityClient(root_window, 28 aura::client::SetVisibilityClient(root_window,
28 visibility_controller_.get()); 29 visibility_controller_.get());
29 30
30 athena::ScreenManager::Create(root_window); 31 athena::ScreenManager::Create(root_window);
31 athena::WindowManager::Create(); 32 athena::WindowManager::Create();
32 athena::HomeCard::Create(); 33 athena::HomeCard::Create();
34 athena::TaskManager::Create();
33 35
34 SetupBackgroundImage(); 36 SetupBackgroundImage();
35 CreateTestWindows(); 37 CreateTestWindows();
38 CreateTestPages(context);
36 } 39 }
37 40
38 virtual void Shutdown() OVERRIDE { 41 virtual void Shutdown() OVERRIDE {
42 athena::TaskManager::Shutdown();
39 athena::HomeCard::Shutdown(); 43 athena::HomeCard::Shutdown();
40 athena::WindowManager::Shutdown(); 44 athena::WindowManager::Shutdown();
41 athena::ScreenManager::Shutdown(); 45 athena::ScreenManager::Shutdown();
42 visibility_controller_.reset(); 46 visibility_controller_.reset();
43 } 47 }
44 48
45 scoped_ptr< ::wm::VisibilityController> visibility_controller_; 49 scoped_ptr< ::wm::VisibilityController> visibility_controller_;
46 50
47 private: 51 private:
48 DISALLOW_COPY_AND_ASSIGN(AthenaBrowserMainDelegate); 52 DISALLOW_COPY_AND_ASSIGN(AthenaBrowserMainDelegate);
(...skipping 16 matching lines...) Expand all
65 69
66 int main(int argc, const char** argv) { 70 int main(int argc, const char** argv) {
67 AthenaMainDelegate delegate; 71 AthenaMainDelegate delegate;
68 content::ContentMainParams params(&delegate); 72 content::ContentMainParams params(&delegate);
69 73
70 params.argc = argc; 74 params.argc = argc;
71 params.argv = argv; 75 params.argv = argv;
72 76
73 return content::ContentMain(params); 77 return content::ContentMain(params);
74 } 78 }
OLDNEW
« no previous file with comments | « athena/main/DEPS ('k') | athena/main/athena_main.gyp » ('j') | athena/task/public/task.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698