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

Side by Side Diff: ash/mus/sysui_application.cc

Issue 1684823004: Refactors keyboard related code so mash can use a keyboard (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge to trunk Created 4 years, 10 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 | « ash/mus/keyboard_ui_mus.cc ('k') | ash/shell.h » ('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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "ash/mus/sysui_application.h" 5 #include "ash/mus/sysui_application.h"
6 6
7 #include "ash/desktop_background/desktop_background_controller.h" 7 #include "ash/desktop_background/desktop_background_controller.h"
8 #include "ash/host/ash_window_tree_host_init_params.h" 8 #include "ash/host/ash_window_tree_host_init_params.h"
9 #include "ash/host/ash_window_tree_host_platform.h" 9 #include "ash/host/ash_window_tree_host_platform.h"
10 #include "ash/mus/keyboard_ui_mus.h"
10 #include "ash/mus/shell_delegate_mus.h" 11 #include "ash/mus/shell_delegate_mus.h"
11 #include "ash/mus/stub_context_factory.h" 12 #include "ash/mus/stub_context_factory.h"
12 #include "ash/root_window_settings.h" 13 #include "ash/root_window_settings.h"
13 #include "ash/shell.h" 14 #include "ash/shell.h"
14 #include "ash/shell_init_params.h" 15 #include "ash/shell_init_params.h"
15 #include "ash/shell_window_ids.h" 16 #include "ash/shell_window_ids.h"
17 #include "base/bind.h"
16 #include "base/threading/sequenced_worker_pool.h" 18 #include "base/threading/sequenced_worker_pool.h"
17 #include "components/mus/public/cpp/property_type_converters.h" 19 #include "components/mus/public/cpp/property_type_converters.h"
18 #include "mash/wm/public/interfaces/container.mojom.h" 20 #include "mash/wm/public/interfaces/container.mojom.h"
19 #include "ui/aura/env.h" 21 #include "ui/aura/env.h"
20 #include "ui/base/resource/resource_bundle.h" 22 #include "ui/base/resource/resource_bundle.h"
21 #include "ui/base/ui_base_paths.h" 23 #include "ui/base/ui_base_paths.h"
22 #include "ui/message_center/message_center.h" 24 #include "ui/message_center/message_center.h"
23 #include "ui/platform_window/stub/stub_window.h" 25 #include "ui/platform_window/stub/stub_window.h"
24 #include "ui/views/mus/aura_init.h" 26 #include "ui/views/mus/aura_init.h"
25 #include "ui/views/mus/native_widget_mus.h" 27 #include "ui/views/mus/native_widget_mus.h"
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 170
169 ash::AshWindowTreeHost::SetFactory(base::Bind(&CreateWindowTreeHostMus)); 171 ash::AshWindowTreeHost::SetFactory(base::Bind(&CreateWindowTreeHostMus));
170 ash_delegate_ = new ShellDelegateMus; 172 ash_delegate_ = new ShellDelegateMus;
171 173
172 InitializeComponents(); 174 InitializeComponents();
173 175
174 ash::ShellInitParams init_params; 176 ash::ShellInitParams init_params;
175 init_params.delegate = ash_delegate_; 177 init_params.delegate = ash_delegate_;
176 init_params.context_factory = new StubContextFactory; 178 init_params.context_factory = new StubContextFactory;
177 init_params.blocking_pool = worker_pool_.get(); 179 init_params.blocking_pool = worker_pool_.get();
180 init_params.in_mus = true;
181 init_params.keyboard_factory = base::Bind(&KeyboardUIMus::Create, shell);
178 ash::Shell::CreateInstance(init_params); 182 ash::Shell::CreateInstance(init_params);
179 ash::Shell::GetInstance()->CreateShelf(); 183 ash::Shell::GetInstance()->CreateShelf();
180 ash::Shell::GetInstance()->UpdateAfterLoginStatusChange( 184 ash::Shell::GetInstance()->UpdateAfterLoginStatusChange(
181 ash::user::LOGGED_IN_USER); 185 ash::user::LOGGED_IN_USER);
182 186
183 ash::Shell::GetPrimaryRootWindow()->GetHost()->Show(); 187 ash::Shell::GetPrimaryRootWindow()->GetHost()->Show();
184 SetupWallpaper(SkColorSetARGB(255, 0, 255, 0)); 188 SetupWallpaper(SkColorSetARGB(255, 0, 255, 0));
185 } 189 }
186 190
187 void SetupWallpaper(SkColor color) { 191 void SetupWallpaper(SkColor color) {
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 235
232 void SysUIApplication::Initialize(mojo::Shell* shell, 236 void SysUIApplication::Initialize(mojo::Shell* shell,
233 const std::string& url, 237 const std::string& url,
234 uint32_t id) { 238 uint32_t id) {
235 ash_init_.reset(new AshInit()); 239 ash_init_.reset(new AshInit());
236 ash_init_->Initialize(shell); 240 ash_init_->Initialize(shell);
237 } 241 }
238 242
239 } // namespace sysui 243 } // namespace sysui
240 } // namespace ash 244 } // namespace ash
OLDNEW
« no previous file with comments | « ash/mus/keyboard_ui_mus.cc ('k') | ash/shell.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698