Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 11 matching lines...) Expand all Loading... | |
| 22 #include "components/mus/ws/window_tree_factory.h" | 22 #include "components/mus/ws/window_tree_factory.h" |
| 23 #include "components/mus/ws/window_tree_host_factory.h" | 23 #include "components/mus/ws/window_tree_host_factory.h" |
| 24 #include "components/resource_provider/public/cpp/resource_loader.h" | 24 #include "components/resource_provider/public/cpp/resource_loader.h" |
| 25 #include "mojo/public/c/system/main.h" | 25 #include "mojo/public/c/system/main.h" |
| 26 #include "mojo/services/tracing/public/cpp/tracing_impl.h" | 26 #include "mojo/services/tracing/public/cpp/tracing_impl.h" |
| 27 #include "mojo/shell/public/cpp/connection.h" | 27 #include "mojo/shell/public/cpp/connection.h" |
| 28 #include "mojo/shell/public/cpp/connector.h" | 28 #include "mojo/shell/public/cpp/connector.h" |
| 29 #include "ui/base/resource/resource_bundle.h" | 29 #include "ui/base/resource/resource_bundle.h" |
| 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/ozone/layout/keyboard_layout_engine.h" | |
|
sky
2016/04/05 20:27:45
Move to 42ish?
kylechar
2016/04/05 21:44:13
Done.
| |
| 33 #include "ui/events/ozone/layout/keyboard_layout_engine_manager.h" | |
| 32 #include "ui/events/platform/platform_event_source.h" | 34 #include "ui/events/platform/platform_event_source.h" |
| 33 #include "ui/gl/gl_surface.h" | 35 #include "ui/gl/gl_surface.h" |
| 34 | 36 |
| 35 #if defined(USE_X11) | 37 #if defined(USE_X11) |
| 36 #include <X11/Xlib.h> | 38 #include <X11/Xlib.h> |
| 37 #include "base/command_line.h" | 39 #include "base/command_line.h" |
| 38 #include "ui/platform_window/x11/x11_window.h" | 40 #include "ui/platform_window/x11/x11_window.h" |
| 39 #elif defined(USE_OZONE) | 41 #elif defined(USE_OZONE) |
| 40 #include "ui/ozone/public/ozone_platform.h" | 42 #include "ui/ozone/public/ozone_platform.h" |
| 41 #endif | 43 #endif |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 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 Loading... | |
| 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 |
| OLD | NEW |