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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « components/mus/BUILD.gn ('k') | no next file » | 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 "components/mus/mus_app.h" 5 #include "components/mus/mus_app.h"
6 6
7 #include <set> 7 #include <set>
8 8
9 #include "base/memory/weak_ptr.h" 9 #include "base/memory/weak_ptr.h"
10 #include "base/stl_util.h" 10 #include "base/stl_util.h"
(...skipping 19 matching lines...) Expand all
30 #include "ui/base/ui_base_paths.h" 30 #include "ui/base/ui_base_paths.h"
31 #include "ui/events/event_switches.h" 31 #include "ui/events/event_switches.h"
32 #include "ui/events/platform/platform_event_source.h" 32 #include "ui/events/platform/platform_event_source.h"
33 #include "ui/gl/gl_surface.h" 33 #include "ui/gl/gl_surface.h"
34 34
35 #if defined(USE_X11) 35 #if defined(USE_X11)
36 #include <X11/Xlib.h> 36 #include <X11/Xlib.h>
37 #include "base/command_line.h" 37 #include "base/command_line.h"
38 #include "ui/platform_window/x11/x11_window.h" 38 #include "ui/platform_window/x11/x11_window.h"
39 #elif defined(USE_OZONE) 39 #elif defined(USE_OZONE)
40 #include "ui/events/ozone/layout/keyboard_layout_engine.h"
41 #include "ui/events/ozone/layout/keyboard_layout_engine_manager.h"
40 #include "ui/ozone/public/ozone_platform.h" 42 #include "ui/ozone/public/ozone_platform.h"
41 #endif 43 #endif
42 44
43 using mojo::Connection; 45 using mojo::Connection;
44 using mojo::InterfaceRequest; 46 using mojo::InterfaceRequest;
45 using mus::mojom::WindowTreeHostFactory; 47 using mus::mojom::WindowTreeHostFactory;
46 using mus::mojom::Gpu; 48 using mus::mojom::Gpu;
47 49
48 namespace mus { 50 namespace mus {
49 51
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 138
137 InitializeResources(connector); 139 InitializeResources(connector);
138 140
139 #if defined(USE_OZONE) 141 #if defined(USE_OZONE)
140 // The ozone platform can provide its own event source. So initialize the 142 // The ozone platform can provide its own event source. So initialize the
141 // platform before creating the default event source. 143 // platform before creating the default event source.
142 // TODO(rjkroege): Add tracing here. 144 // TODO(rjkroege): Add tracing here.
143 // Because GL libraries need to be initialized before entering the sandbox, 145 // Because GL libraries need to be initialized before entering the sandbox,
144 // in MUS, |InitializeForUI| will load the GL libraries. 146 // in MUS, |InitializeForUI| will load the GL libraries.
145 ui::OzonePlatform::InitializeForUI(); 147 ui::OzonePlatform::InitializeForUI();
148
149 // TODO(kylechar): We might not always want a US keyboard layout.
150 ui::KeyboardLayoutEngineManager::GetKeyboardLayoutEngine()
151 ->SetCurrentLayoutByName("us");
146 #endif 152 #endif
147 153
148 // TODO(rjkroege): Enter sandbox here before we start threads in GpuState 154 // TODO(rjkroege): Enter sandbox here before we start threads in GpuState
149 // http://crbug.com/584532 155 // http://crbug.com/584532
150 156
151 #if !defined(OS_ANDROID) 157 #if !defined(OS_ANDROID)
152 event_source_ = ui::PlatformEventSource::CreateDefault(); 158 event_source_ = ui::PlatformEventSource::CreateDefault();
153 #endif 159 #endif
154 160
155 // TODO(rjkroege): It is possible that we might want to generalize the 161 // TODO(rjkroege): It is possible that we might want to generalize the
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 user_state->window_tree_host_factory->AddBinding(std::move(request)); 250 user_state->window_tree_host_factory->AddBinding(std::move(request));
245 } 251 }
246 252
247 void MandolineUIServicesApp::Create(mojo::Connection* connection, 253 void MandolineUIServicesApp::Create(mojo::Connection* connection,
248 mojom::GpuRequest request) { 254 mojom::GpuRequest request) {
249 DCHECK(platform_display_init_params_.gpu_state); 255 DCHECK(platform_display_init_params_.gpu_state);
250 new GpuImpl(std::move(request), platform_display_init_params_.gpu_state); 256 new GpuImpl(std::move(request), platform_display_init_params_.gpu_state);
251 } 257 }
252 258
253 } // namespace mus 259 } // namespace mus
OLDNEW
« 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