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

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

Issue 483363003: [Athena] Add status icons and system time to the desktop background (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 3 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 | « athena/common/container_priorities.h ('k') | athena/main/athena_main.gyp » ('j') | 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 "athena/main/athena_launcher.h" 5 #include "athena/main/athena_launcher.h"
6 6
7 #include "athena/activity/public/activity_factory.h" 7 #include "athena/activity/public/activity_factory.h"
8 #include "athena/activity/public/activity_manager.h" 8 #include "athena/activity/public/activity_manager.h"
9 #include "athena/content/public/app_registry.h" 9 #include "athena/content/public/app_registry.h"
10 #include "athena/content/public/content_activity_factory_creator.h" 10 #include "athena/content/public/content_activity_factory_creator.h"
11 #include "athena/content/public/content_app_model_builder.h" 11 #include "athena/content/public/content_app_model_builder.h"
12 #include "athena/env/public/athena_env.h" 12 #include "athena/env/public/athena_env.h"
13 #include "athena/extensions/public/extensions_delegate.h" 13 #include "athena/extensions/public/extensions_delegate.h"
14 #include "athena/home/public/home_card.h" 14 #include "athena/home/public/home_card.h"
15 #include "athena/input/public/input_manager.h" 15 #include "athena/input/public/input_manager.h"
16 #include "athena/main/debug/debug_window.h"
17 #include "athena/main/placeholder.h" 16 #include "athena/main/placeholder.h"
18 #include "athena/main/placeholder.h" 17 #include "athena/main/placeholder.h"
19 #include "athena/main/url_search_provider.h" 18 #include "athena/main/url_search_provider.h"
20 #include "athena/resource_manager/public/resource_manager.h" 19 #include "athena/resource_manager/public/resource_manager.h"
21 #include "athena/screen/public/screen_manager.h" 20 #include "athena/screen/public/screen_manager.h"
22 #include "athena/screen/public/screen_manager.h" 21 #include "athena/screen/public/screen_manager.h"
23 #include "athena/system/public/system_ui.h" 22 #include "athena/system/public/system_ui.h"
24 #include "athena/virtual_keyboard/public/virtual_keyboard_manager.h" 23 #include "athena/virtual_keyboard/public/virtual_keyboard_manager.h"
25 #include "athena/wm/public/window_manager.h" 24 #include "athena/wm/public/window_manager.h"
26 #include "base/command_line.h" 25 #include "base/command_line.h"
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 111
113 AthenaEnvState* env_state = new AthenaEnvState; 112 AthenaEnvState* env_state = new AthenaEnvState;
114 113
115 // Setup VisibilityClient 114 // Setup VisibilityClient
116 env_state->visibility_client.reset(new ::wm::VisibilityController); 115 env_state->visibility_client.reset(new ::wm::VisibilityController);
117 aura::Window* root_window = athena::AthenaEnv::Get()->GetHost()->window(); 116 aura::Window* root_window = athena::AthenaEnv::Get()->GetHost()->window();
118 117
119 aura::client::SetVisibilityClient(root_window, 118 aura::client::SetVisibilityClient(root_window,
120 env_state->visibility_client.get()); 119 env_state->visibility_client.get());
121 120
122 athena::SystemUI::Create(file_runner);
123 athena::InputManager::Create()->OnRootWindowCreated(root_window); 121 athena::InputManager::Create()->OnRootWindowCreated(root_window);
124 athena::ScreenManager::Create(root_window); 122 athena::ScreenManager::Create(root_window);
123 athena::SystemUI::Create(file_runner);
125 athena::WindowManager::Create(); 124 athena::WindowManager::Create();
126 athena::AppRegistry::Create(); 125 athena::AppRegistry::Create();
127 SetupBackgroundImage(); 126 SetupBackgroundImage();
128 127
129 athena::ScreenManager::Get()->GetContext()->SetProperty( 128 athena::ScreenManager::Get()->GetContext()->SetProperty(
130 kAthenaEnvStateKey, env_state); 129 kAthenaEnvStateKey, env_state);
131 } 130 }
132 131
133 void StartAthenaSessionWithContext(content::BrowserContext* context) { 132 void StartAthenaSessionWithContext(content::BrowserContext* context) {
134 StartAthenaSession(athena::CreateContentActivityFactory(), 133 StartAthenaSession(athena::CreateContentActivityFactory(),
135 new athena::ContentAppModelBuilder(context)); 134 new athena::ContentAppModelBuilder(context));
136 athena::VirtualKeyboardManager::Create(context); 135 athena::VirtualKeyboardManager::Create(context);
137 athena::HomeCard::Get()->RegisterSearchProvider( 136 athena::HomeCard::Get()->RegisterSearchProvider(
138 new athena::UrlSearchProvider(context)); 137 new athena::UrlSearchProvider(context));
139 AthenaEnvState* env_state = 138 AthenaEnvState* env_state =
140 athena::ScreenManager::Get()->GetContext()->GetProperty( 139 athena::ScreenManager::Get()->GetContext()->GetProperty(
141 kAthenaEnvStateKey); 140 kAthenaEnvStateKey);
142 141
143 env_state->virtual_keyboard_observer.reset(new VirtualKeyboardObserver); 142 env_state->virtual_keyboard_observer.reset(new VirtualKeyboardObserver);
144 CreateTestPages(context); 143 CreateTestPages(context);
145 CreateDebugWindow();
146 } 144 }
147 145
148 void StartAthenaSession(athena::ActivityFactory* activity_factory, 146 void StartAthenaSession(athena::ActivityFactory* activity_factory,
149 athena::AppModelBuilder* app_model_builder) { 147 athena::AppModelBuilder* app_model_builder) {
150 athena::HomeCard::Create(app_model_builder); 148 athena::HomeCard::Create(app_model_builder);
151 athena::ActivityManager::Create(); 149 athena::ActivityManager::Create();
152 athena::ResourceManager::Create(); 150 athena::ResourceManager::Create();
153 athena::ActivityFactory::RegisterActivityFactory(activity_factory); 151 athena::ActivityFactory::RegisterActivityFactory(activity_factory);
154 } 152 }
155 153
156 void ShutdownAthena() { 154 void ShutdownAthena() {
157 athena::ActivityFactory::Shutdown(); 155 athena::ActivityFactory::Shutdown();
158 athena::ResourceManager::Shutdown(); 156 athena::ResourceManager::Shutdown();
159 athena::ActivityManager::Shutdown(); 157 athena::ActivityManager::Shutdown();
160 athena::HomeCard::Shutdown(); 158 athena::HomeCard::Shutdown();
161 athena::AppRegistry::ShutDown(); 159 athena::AppRegistry::ShutDown();
162 athena::WindowManager::Shutdown(); 160 athena::WindowManager::Shutdown();
161 athena::SystemUI::Shutdown();
163 athena::ScreenManager::Shutdown(); 162 athena::ScreenManager::Shutdown();
164 athena::InputManager::Shutdown(); 163 athena::InputManager::Shutdown();
165 athena::SystemUI::Shutdown();
166 athena::ExtensionsDelegate::Shutdown(); 164 athena::ExtensionsDelegate::Shutdown();
167 athena::AthenaEnv::Shutdown(); 165 athena::AthenaEnv::Shutdown();
168 166
169 delete views::ViewsDelegate::views_delegate; 167 delete views::ViewsDelegate::views_delegate;
170 } 168 }
171 169
172 } // namespace athena 170 } // namespace athena
OLDNEW
« no previous file with comments | « athena/common/container_priorities.h ('k') | athena/main/athena_main.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698