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

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

Issue 576113002: Reland "Use chromeos accelerometer reader and support only lid accelerometer. (patchset #3 id:60001… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix compile. 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
« no previous file with comments | « athena/athena.gyp ('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/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"
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 } 76 }
77 77
78 private: 78 private:
79 virtual void OnKeyboardBoundsChanging(const gfx::Rect& new_bounds) OVERRIDE { 79 virtual void OnKeyboardBoundsChanging(const gfx::Rect& new_bounds) OVERRIDE {
80 HomeCard::Get()->UpdateVirtualKeyboardBounds(new_bounds); 80 HomeCard::Get()->UpdateVirtualKeyboardBounds(new_bounds);
81 } 81 }
82 82
83 DISALLOW_COPY_AND_ASSIGN(VirtualKeyboardObserver); 83 DISALLOW_COPY_AND_ASSIGN(VirtualKeyboardObserver);
84 }; 84 };
85 85
86 void StartAthenaEnv(scoped_refptr<base::TaskRunner> file_runner) { 86 void StartAthenaEnv(scoped_refptr<base::TaskRunner> blocking_task_runner) {
87 athena::AthenaEnv::Create(); 87 athena::AthenaEnv::Create();
88 88
89 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); 89 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
90 90
91 // Force showing in the experimental app-list view. 91 // Force showing in the experimental app-list view.
92 command_line->AppendSwitch(app_list::switches::kEnableExperimentalAppList); 92 command_line->AppendSwitch(app_list::switches::kEnableExperimentalAppList);
93 command_line->AppendSwitch(switches::kEnableOverlayScrollbar); 93 command_line->AppendSwitch(switches::kEnableOverlayScrollbar);
94 94
95 #if defined(USE_X11) 95 #if defined(USE_X11)
96 ui::TouchFactory::SetTouchDeviceListFromCommandLine(); 96 ui::TouchFactory::SetTouchDeviceListFromCommandLine();
97 #endif 97 #endif
98 98
99 views::ViewsDelegate::views_delegate = new AthenaViewsDelegate(); 99 views::ViewsDelegate::views_delegate = new AthenaViewsDelegate();
100 100
101 AthenaEnvState* env_state = new AthenaEnvState; 101 AthenaEnvState* env_state = new AthenaEnvState;
102 102
103 // Setup VisibilityClient 103 // Setup VisibilityClient
104 env_state->visibility_client.reset(new ::wm::VisibilityController); 104 env_state->visibility_client.reset(new ::wm::VisibilityController);
105 aura::Window* root_window = athena::AthenaEnv::Get()->GetHost()->window(); 105 aura::Window* root_window = athena::AthenaEnv::Get()->GetHost()->window();
106 106
107 aura::client::SetVisibilityClient(root_window, 107 aura::client::SetVisibilityClient(root_window,
108 env_state->visibility_client.get()); 108 env_state->visibility_client.get());
109 109
110 athena::InputManager::Create()->OnRootWindowCreated(root_window); 110 athena::InputManager::Create()->OnRootWindowCreated(root_window);
111 athena::ScreenManager::Create(root_window); 111 athena::ScreenManager::Create(root_window);
112 athena::SystemUI::Create(file_runner); 112 athena::SystemUI::Create(blocking_task_runner);
113 athena::WindowManager::Create(); 113 athena::WindowManager::Create();
114 athena::AppRegistry::Create(); 114 athena::AppRegistry::Create();
115 SetupBackgroundImage(); 115 SetupBackgroundImage();
116 116
117 athena::ScreenManager::Get()->GetContext()->SetProperty( 117 athena::ScreenManager::Get()->GetContext()->SetProperty(
118 kAthenaEnvStateKey, env_state); 118 kAthenaEnvStateKey, env_state);
119 } 119 }
120 120
121 void CreateVirtualKeyboardWithContext(content::BrowserContext* context) { 121 void CreateVirtualKeyboardWithContext(content::BrowserContext* context) {
122 athena::VirtualKeyboardManager::Create(context); 122 athena::VirtualKeyboardManager::Create(context);
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 athena::SystemUI::Shutdown(); 158 athena::SystemUI::Shutdown();
159 athena::ScreenManager::Shutdown(); 159 athena::ScreenManager::Shutdown();
160 athena::InputManager::Shutdown(); 160 athena::InputManager::Shutdown();
161 athena::ExtensionsDelegate::Shutdown(); 161 athena::ExtensionsDelegate::Shutdown();
162 athena::AthenaEnv::Shutdown(); 162 athena::AthenaEnv::Shutdown();
163 163
164 delete views::ViewsDelegate::views_delegate; 164 delete views::ViewsDelegate::views_delegate;
165 } 165 }
166 166
167 } // namespace athena 167 } // namespace athena
OLDNEW
« no previous file with comments | « athena/athena.gyp ('k') | athena/main/athena_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698