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

Unified 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: gn 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/mus/mojo_shell.h ('k') | ash/shell.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/mus/sysui_application.cc
diff --git a/ash/mus/sysui_application.cc b/ash/mus/sysui_application.cc
index 15339110cf731197f368915793d501dcf820dff9..ddba41e08bef0f9aca7c7bfaf0cb5d7968558f54 100644
--- a/ash/mus/sysui_application.cc
+++ b/ash/mus/sysui_application.cc
@@ -7,12 +7,15 @@
#include "ash/desktop_background/desktop_background_controller.h"
#include "ash/host/ash_window_tree_host_init_params.h"
#include "ash/host/ash_window_tree_host_platform.h"
+#include "ash/mus/keyboard_ui_mus.h"
+#include "ash/mus/mojo_shell.h"
#include "ash/mus/shell_delegate_mus.h"
#include "ash/mus/stub_context_factory.h"
#include "ash/root_window_settings.h"
#include "ash/shell.h"
#include "ash/shell_init_params.h"
#include "ash/shell_window_ids.h"
+#include "base/bind.h"
#include "base/threading/sequenced_worker_pool.h"
#include "components/mus/public/cpp/property_type_converters.h"
#include "mash/wm/public/interfaces/container.mojom.h"
@@ -33,6 +36,8 @@ namespace sysui {
namespace {
+mojo::Shell* mojo_shell = nullptr;
+
// Tries to determine the corresponding container in mash from the ash container
// for the widget.
mash::wm::mojom::Container GetContainerId(aura::Window* container) {
@@ -129,6 +134,8 @@ class AshInit {
aura::Window* root() { return ash::Shell::GetPrimaryRootWindow(); }
void Initialize(mojo::Shell* shell) {
+ sysui::mojo_shell = shell;
+
aura_init_.reset(new views::AuraInit(shell, "views_mus_resources.pak"));
views::WindowManagerConnection::Create(shell);
@@ -153,6 +160,8 @@ class AshInit {
init_params.delegate = ash_delegate_;
init_params.context_factory = new StubContextFactory;
init_params.blocking_pool = worker_pool_.get();
+ init_params.in_mus = true;
+ init_params.keyboard_factory = base::Bind(&KeyboardUIMus::Create);
sadrul 2016/02/11 17:42:11 Send |shell| with Bind instead of GetMojoShell()?
sky 2016/02/11 18:00:24 Done.
ash::Shell::CreateInstance(init_params);
ash::Shell::GetInstance()->CreateShelf();
ash::Shell::GetInstance()->UpdateAfterLoginStatusChange(
@@ -204,4 +213,9 @@ void SysUIApplication::Initialize(mojo::Shell* shell,
}
} // namespace sysui
+
+mojo::Shell* GetMojoShell() {
+ return sysui::mojo_shell;
+}
+
} // namespace ash
« no previous file with comments | « ash/mus/mojo_shell.h ('k') | ash/shell.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698