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

Unified Diff: components/mus/mus_app.cc

Issue 1864713002: Set keyboard layout in MUS. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 8 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 | « components/mus/BUILD.gn ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/mus/mus_app.cc
diff --git a/components/mus/mus_app.cc b/components/mus/mus_app.cc
index 3d0edfa6a8c62efb2662a9584ec8c94cad35a761..de56eaf43ed4069b7f3f6a6e2e492db9a4a3dd15 100644
--- a/components/mus/mus_app.cc
+++ b/components/mus/mus_app.cc
@@ -37,6 +37,8 @@
#include "base/command_line.h"
#include "ui/platform_window/x11/x11_window.h"
#elif defined(USE_OZONE)
+#include "ui/events/ozone/layout/keyboard_layout_engine.h"
+#include "ui/events/ozone/layout/keyboard_layout_engine_manager.h"
#include "ui/ozone/public/ozone_platform.h"
#endif
@@ -143,6 +145,10 @@ void MandolineUIServicesApp::Initialize(mojo::Connector* connector,
// Because GL libraries need to be initialized before entering the sandbox,
// in MUS, |InitializeForUI| will load the GL libraries.
ui::OzonePlatform::InitializeForUI();
+
+ // TODO(kylechar): We might not always want a US keyboard layout.
+ ui::KeyboardLayoutEngineManager::GetKeyboardLayoutEngine()
+ ->SetCurrentLayoutByName("us");
#endif
// TODO(rjkroege): Enter sandbox here before we start threads in GpuState
« no previous file with comments | « components/mus/BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698