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

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

Issue 620663005: Lock screen for Chrome-Athena (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: one more nit Created 6 years, 2 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
« no previous file with comments | « athena/main/DEPS ('k') | athena/screen/screen_manager_impl.cc » ('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/public/athena_launcher.h" 5 #include "athena/main/public/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/env/public/athena_env.h" 11 #include "athena/env/public/athena_env.h"
12 #include "athena/extensions/public/apps_search_controller_factory.h" 12 #include "athena/extensions/public/apps_search_controller_factory.h"
13 #include "athena/extensions/public/extension_app_model_builder.h" 13 #include "athena/extensions/public/extension_app_model_builder.h"
14 #include "athena/extensions/public/extensions_delegate.h" 14 #include "athena/extensions/public/extensions_delegate.h"
15 #include "athena/home/public/home_card.h" 15 #include "athena/home/public/home_card.h"
16 #include "athena/home/public/search_controller_factory.h" 16 #include "athena/home/public/search_controller_factory.h"
17 #include "athena/input/public/input_manager.h" 17 #include "athena/input/public/input_manager.h"
18 #include "athena/main/athena_views_delegate.h" 18 #include "athena/main/athena_views_delegate.h"
19 #include "athena/main/placeholder.h" 19 #include "athena/main/placeholder.h"
20 #include "athena/main/placeholder.h" 20 #include "athena/main/placeholder.h"
21 #include "athena/resource_manager/public/resource_manager.h" 21 #include "athena/resource_manager/public/resource_manager.h"
22 #include "athena/screen/public/screen_manager.h" 22 #include "athena/screen/public/screen_manager.h"
23 #include "athena/screen_lock/public/screen_lock_manager.h"
23 #include "athena/system/public/system_ui.h" 24 #include "athena/system/public/system_ui.h"
24 #include "athena/virtual_keyboard/public/virtual_keyboard_manager.h" 25 #include "athena/virtual_keyboard/public/virtual_keyboard_manager.h"
25 #include "athena/wm/public/window_manager.h" 26 #include "athena/wm/public/window_manager.h"
26 #include "base/command_line.h" 27 #include "base/command_line.h"
27 #include "base/memory/scoped_ptr.h" 28 #include "base/memory/scoped_ptr.h"
28 #include "content/public/common/content_switches.h" 29 #include "content/public/common/content_switches.h"
29 #include "ui/app_list/app_list_switches.h" 30 #include "ui/app_list/app_list_switches.h"
30 #include "ui/aura/window_property.h" 31 #include "ui/aura/window_property.h"
31 #include "ui/aura/window_tree_host.h" 32 #include "ui/aura/window_tree_host.h"
32 #include "ui/keyboard/keyboard_controller.h" 33 #include "ui/keyboard/keyboard_controller.h"
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 122
122 athena::ScreenManager::Get()->GetContext()->SetProperty( 123 athena::ScreenManager::Get()->GetContext()->SetProperty(
123 kAthenaEnvStateKey, env_state); 124 kAthenaEnvStateKey, env_state);
124 } 125 }
125 126
126 void CreateVirtualKeyboardWithContext(content::BrowserContext* context) { 127 void CreateVirtualKeyboardWithContext(content::BrowserContext* context) {
127 athena::VirtualKeyboardManager::Create(context); 128 athena::VirtualKeyboardManager::Create(context);
128 } 129 }
129 130
130 void StartAthenaSessionWithContext(content::BrowserContext* context) { 131 void StartAthenaSessionWithContext(content::BrowserContext* context) {
132 athena::ScreenLockManager::Create();
131 athena::ExtensionsDelegate::CreateExtensionsDelegate(context); 133 athena::ExtensionsDelegate::CreateExtensionsDelegate(context);
132 StartAthenaSession( 134 StartAthenaSession(
133 athena::CreateContentActivityFactory(), 135 athena::CreateContentActivityFactory(),
134 make_scoped_ptr(new athena::ExtensionAppModelBuilder(context)), 136 make_scoped_ptr(new athena::ExtensionAppModelBuilder(context)),
135 athena::CreateSearchControllerFactory(context)); 137 athena::CreateSearchControllerFactory(context));
136 AthenaEnvState* env_state = 138 AthenaEnvState* env_state =
137 athena::ScreenManager::Get()->GetContext()->GetProperty( 139 athena::ScreenManager::Get()->GetContext()->GetProperty(
138 kAthenaEnvStateKey); 140 kAthenaEnvStateKey);
139 141
140 env_state->virtual_keyboard_observer.reset(new VirtualKeyboardObserver); 142 env_state->virtual_keyboard_observer.reset(new VirtualKeyboardObserver);
(...skipping 12 matching lines...) Expand all
153 athena::ActivityFactory::RegisterActivityFactory(activity_factory); 155 athena::ActivityFactory::RegisterActivityFactory(activity_factory);
154 } 156 }
155 157
156 void ShutdownAthena() { 158 void ShutdownAthena() {
157 if (session_started) { 159 if (session_started) {
158 athena::ActivityFactory::Shutdown(); 160 athena::ActivityFactory::Shutdown();
159 athena::ResourceManager::Shutdown(); 161 athena::ResourceManager::Shutdown();
160 athena::ActivityManager::Shutdown(); 162 athena::ActivityManager::Shutdown();
161 athena::HomeCard::Shutdown(); 163 athena::HomeCard::Shutdown();
162 athena::ExtensionsDelegate::Shutdown(); 164 athena::ExtensionsDelegate::Shutdown();
165 athena::ScreenLockManager::Shutdown();
163 session_started = false; 166 session_started = false;
164 } 167 }
165 athena::AppRegistry::ShutDown(); 168 athena::AppRegistry::ShutDown();
166 athena::WindowManager::Shutdown(); 169 athena::WindowManager::Shutdown();
167 athena::SystemUI::Shutdown(); 170 athena::SystemUI::Shutdown();
168 athena::ScreenManager::Shutdown(); 171 athena::ScreenManager::Shutdown();
169 athena::InputManager::Shutdown(); 172 athena::InputManager::Shutdown();
170 athena::AthenaEnv::Shutdown(); 173 athena::AthenaEnv::Shutdown();
171 174
172 ShutdownAthenaViewsDelegate(); 175 ShutdownAthenaViewsDelegate();
173 } 176 }
174 177
175 } // namespace athena 178 } // namespace athena
OLDNEW
« no previous file with comments | « athena/main/DEPS ('k') | athena/screen/screen_manager_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698