| 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 "services/ui/service.h" | 5 #include "services/ui/service.h" |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 171 InitializeResources(connector); | 171 InitializeResources(connector); |
| 172 | 172 |
| 173 #if defined(USE_OZONE) | 173 #if defined(USE_OZONE) |
| 174 // The ozone platform can provide its own event source. So initialize the | 174 // The ozone platform can provide its own event source. So initialize the |
| 175 // platform before creating the default event source. | 175 // platform before creating the default event source. |
| 176 // Because GL libraries need to be initialized before entering the sandbox, | 176 // Because GL libraries need to be initialized before entering the sandbox, |
| 177 // in MUS, |InitializeForUI| will load the GL libraries. | 177 // in MUS, |InitializeForUI| will load the GL libraries. |
| 178 ui::OzonePlatform::InitParams params; | 178 ui::OzonePlatform::InitParams params; |
| 179 params.connector = connector; | 179 params.connector = connector; |
| 180 params.single_process = false; | 180 params.single_process = false; |
| 181 | |
| 182 ui::OzonePlatform::InitializeForUI(params); | 181 ui::OzonePlatform::InitializeForUI(params); |
| 183 | 182 |
| 184 // TODO(kylechar): We might not always want a US keyboard layout. | 183 // TODO(kylechar): We might not always want a US keyboard layout. |
| 185 ui::KeyboardLayoutEngineManager::GetKeyboardLayoutEngine() | 184 ui::KeyboardLayoutEngineManager::GetKeyboardLayoutEngine() |
| 186 ->SetCurrentLayoutByName("us"); | 185 ->SetCurrentLayoutByName("us"); |
| 187 client_native_pixmap_factory_ = ui::ClientNativePixmapFactory::Create(); | 186 client_native_pixmap_factory_ = ui::ClientNativePixmapFactory::Create(); |
| 188 ui::ClientNativePixmapFactory::SetInstance( | 187 ui::ClientNativePixmapFactory::SetInstance( |
| 189 client_native_pixmap_factory_.get()); | 188 client_native_pixmap_factory_.get()); |
| 190 | 189 |
| 191 DCHECK(ui::ClientNativePixmapFactory::GetInstance()); | 190 DCHECK(ui::ClientNativePixmapFactory::GetInstance()); |
| (...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 380 // Display manages its own lifetime. | 379 // Display manages its own lifetime. |
| 381 ws::Display* host_impl = | 380 ws::Display* host_impl = |
| 382 new ws::Display(window_server_.get(), platform_display_init_params_); | 381 new ws::Display(window_server_.get(), platform_display_init_params_); |
| 383 host_impl->Init(nullptr); | 382 host_impl->Init(nullptr); |
| 384 | 383 |
| 385 if (touch_controller_) | 384 if (touch_controller_) |
| 386 touch_controller_->UpdateTouchTransforms(); | 385 touch_controller_->UpdateTouchTransforms(); |
| 387 } | 386 } |
| 388 | 387 |
| 389 } // namespace ui | 388 } // namespace ui |
| OLD | NEW |