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 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
172 InitializeResources(connector); | 172 InitializeResources(connector); |
173 | 173 |
174 #if defined(USE_OZONE) | 174 #if defined(USE_OZONE) |
175 // The ozone platform can provide its own event source. So initialize the | 175 // The ozone platform can provide its own event source. So initialize the |
176 // platform before creating the default event source. | 176 // platform before creating the default event source. |
177 // Because GL libraries need to be initialized before entering the sandbox, | 177 // Because GL libraries need to be initialized before entering the sandbox, |
178 // in MUS, |InitializeForUI| will load the GL libraries. | 178 // in MUS, |InitializeForUI| will load the GL libraries. |
179 ui::OzonePlatform::InitParams params; | 179 ui::OzonePlatform::InitParams params; |
180 params.connector = connector; | 180 params.connector = connector; |
181 params.single_process = false; | 181 params.single_process = false; |
182 | |
183 ui::OzonePlatform::InitializeForUI(params); | 182 ui::OzonePlatform::InitializeForUI(params); |
184 | 183 |
185 // TODO(kylechar): We might not always want a US keyboard layout. | 184 // TODO(kylechar): We might not always want a US keyboard layout. |
186 ui::KeyboardLayoutEngineManager::GetKeyboardLayoutEngine() | 185 ui::KeyboardLayoutEngineManager::GetKeyboardLayoutEngine() |
187 ->SetCurrentLayoutByName("us"); | 186 ->SetCurrentLayoutByName("us"); |
188 client_native_pixmap_factory_ = ui::ClientNativePixmapFactory::Create(); | 187 client_native_pixmap_factory_ = ui::ClientNativePixmapFactory::Create(); |
189 ui::ClientNativePixmapFactory::SetInstance( | 188 ui::ClientNativePixmapFactory::SetInstance( |
190 client_native_pixmap_factory_.get()); | 189 client_native_pixmap_factory_.get()); |
191 | 190 |
192 DCHECK(ui::ClientNativePixmapFactory::GetInstance()); | 191 DCHECK(ui::ClientNativePixmapFactory::GetInstance()); |
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
391 // Display manages its own lifetime. | 390 // Display manages its own lifetime. |
392 ws::Display* host_impl = | 391 ws::Display* host_impl = |
393 new ws::Display(window_server_.get(), platform_display_init_params_); | 392 new ws::Display(window_server_.get(), platform_display_init_params_); |
394 host_impl->Init(nullptr); | 393 host_impl->Init(nullptr); |
395 | 394 |
396 if (touch_controller_) | 395 if (touch_controller_) |
397 touch_controller_->UpdateTouchTransforms(); | 396 touch_controller_->UpdateTouchTransforms(); |
398 } | 397 } |
399 | 398 |
400 } // namespace ui | 399 } // namespace ui |
OLD | NEW |