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

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

Issue 490033003: Fixes three crashes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add file thread Created 6 years, 4 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/main/athena_launcher.h ('k') | athena/main/athena_main.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/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/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/home/public/home_card.h" 11 #include "athena/home/public/home_card.h"
12 #include "athena/home/public/home_card.h" 12 #include "athena/home/public/home_card.h"
13 #include "athena/input/public/input_manager.h" 13 #include "athena/input/public/input_manager.h"
14 #include "athena/main/debug/debug_window.h" 14 #include "athena/main/debug/debug_window.h"
15 #include "athena/main/placeholder.h" 15 #include "athena/main/placeholder.h"
16 #include "athena/main/placeholder.h" 16 #include "athena/main/placeholder.h"
17 #include "athena/main/url_search_provider.h" 17 #include "athena/main/url_search_provider.h"
18 #include "athena/screen/public/screen_manager.h" 18 #include "athena/screen/public/screen_manager.h"
19 #include "athena/screen/public/screen_manager.h" 19 #include "athena/screen/public/screen_manager.h"
20 #include "athena/system/public/system_ui.h" 20 #include "athena/system/public/system_ui.h"
21 #include "athena/virtual_keyboard/public/virtual_keyboard_manager.h" 21 #include "athena/virtual_keyboard/public/virtual_keyboard_manager.h"
22 #include "athena/wm/public/window_manager.h" 22 #include "athena/wm/public/window_manager.h"
23 #include "base/command_line.h" 23 #include "base/command_line.h"
24 #include "base/memory/scoped_ptr.h" 24 #include "base/memory/scoped_ptr.h"
25 #include "content/public/browser/browser_thread.h"
26 #include "ui/app_list/app_list_switches.h" 25 #include "ui/app_list/app_list_switches.h"
27 #include "ui/aura/window_property.h" 26 #include "ui/aura/window_property.h"
28 #include "ui/keyboard/keyboard_controller.h" 27 #include "ui/keyboard/keyboard_controller.h"
29 #include "ui/keyboard/keyboard_controller_observer.h" 28 #include "ui/keyboard/keyboard_controller_observer.h"
30 #include "ui/native_theme/native_theme_switches.h" 29 #include "ui/native_theme/native_theme_switches.h"
31 #include "ui/views/views_delegate.h" 30 #include "ui/views/views_delegate.h"
32 #include "ui/wm/core/visibility_controller.h" 31 #include "ui/wm/core/visibility_controller.h"
33 32
34 #if defined(USE_X11) 33 #if defined(USE_X11)
35 #include "ui/events/x/touch_factory_x11.h" 34 #include "ui/events/x/touch_factory_x11.h"
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 // views::ViewsDelegate: 84 // views::ViewsDelegate:
86 virtual void OnBeforeWidgetInit( 85 virtual void OnBeforeWidgetInit(
87 views::Widget::InitParams* params, 86 views::Widget::InitParams* params,
88 views::internal::NativeWidgetDelegate* delegate) OVERRIDE { 87 views::internal::NativeWidgetDelegate* delegate) OVERRIDE {
89 } 88 }
90 89
91 DISALLOW_COPY_AND_ASSIGN(AthenaViewsDelegate); 90 DISALLOW_COPY_AND_ASSIGN(AthenaViewsDelegate);
92 }; 91 };
93 92
94 void StartAthenaEnv(aura::Window* root_window, 93 void StartAthenaEnv(aura::Window* root_window,
95 athena::ScreenManagerDelegate* delegate) { 94 athena::ScreenManagerDelegate* delegate,
95 scoped_refptr<base::TaskRunner> file_runner) {
96 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); 96 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
97 97
98 // Force showing in the experimental app-list view. 98 // Force showing in the experimental app-list view.
99 command_line->AppendSwitch(app_list::switches::kEnableExperimentalAppList); 99 command_line->AppendSwitch(app_list::switches::kEnableExperimentalAppList);
100 command_line->AppendSwitch(switches::kEnableOverlayScrollbar); 100 command_line->AppendSwitch(switches::kEnableOverlayScrollbar);
101 101
102 #if defined(USE_X11) 102 #if defined(USE_X11)
103 ui::TouchFactory::SetTouchDeviceListFromCommandLine(); 103 ui::TouchFactory::SetTouchDeviceListFromCommandLine();
104 #endif 104 #endif
105 105
106 views::ViewsDelegate::views_delegate = new AthenaViewsDelegate(); 106 views::ViewsDelegate::views_delegate = new AthenaViewsDelegate();
107 107
108 AthenaEnvState* env_state = new AthenaEnvState; 108 AthenaEnvState* env_state = new AthenaEnvState;
109 109
110 // Setup VisibilityClient 110 // Setup VisibilityClient
111 env_state->visibility_client.reset(new ::wm::VisibilityController); 111 env_state->visibility_client.reset(new ::wm::VisibilityController);
112 112
113 aura::client::SetVisibilityClient(root_window, 113 aura::client::SetVisibilityClient(root_window,
114 env_state->visibility_client.get()); 114 env_state->visibility_client.get());
115 115
116 athena::SystemUI::Create( 116 athena::SystemUI::Create(file_runner);
117 content::BrowserThread::GetMessageLoopProxyForThread(
118 content::BrowserThread::FILE));
119 athena::InputManager::Create()->OnRootWindowCreated(root_window); 117 athena::InputManager::Create()->OnRootWindowCreated(root_window);
120 athena::ScreenManager::Create(delegate, root_window); 118 athena::ScreenManager::Create(delegate, root_window);
121 athena::WindowManager::Create(); 119 athena::WindowManager::Create();
122 SetupBackgroundImage(); 120 SetupBackgroundImage();
123 121
124 athena::ScreenManager::Get()->GetContext()->SetProperty( 122 athena::ScreenManager::Get()->GetContext()->SetProperty(
125 kAthenaEnvStateKey, env_state); 123 kAthenaEnvStateKey, env_state);
126 } 124 }
127 125
128 void StartAthenaSessionWithContext(content::BrowserContext* context) { 126 void StartAthenaSessionWithContext(content::BrowserContext* context) {
(...skipping 24 matching lines...) Expand all
153 athena::HomeCard::Shutdown(); 151 athena::HomeCard::Shutdown();
154 athena::WindowManager::Shutdown(); 152 athena::WindowManager::Shutdown();
155 athena::ScreenManager::Shutdown(); 153 athena::ScreenManager::Shutdown();
156 athena::InputManager::Shutdown(); 154 athena::InputManager::Shutdown();
157 athena::SystemUI::Shutdown(); 155 athena::SystemUI::Shutdown();
158 156
159 delete views::ViewsDelegate::views_delegate; 157 delete views::ViewsDelegate::views_delegate;
160 } 158 }
161 159
162 } // namespace athena 160 } // namespace athena
OLDNEW
« no previous file with comments | « athena/main/athena_launcher.h ('k') | athena/main/athena_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698