| 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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 Service::Service() | 89 Service::Service() |
| 90 : test_config_(false), | 90 : test_config_(false), |
| 91 screen_manager_(display::ScreenManager::Create()), | 91 screen_manager_(display::ScreenManager::Create()), |
| 92 ime_registrar_(&ime_server_) {} | 92 ime_registrar_(&ime_server_) {} |
| 93 | 93 |
| 94 Service::~Service() { | 94 Service::~Service() { |
| 95 // Destroy |window_server_| first, since it depends on |event_source_|. | 95 // Destroy |window_server_| first, since it depends on |event_source_|. |
| 96 // WindowServer (or more correctly its Displays) may have state that needs to | 96 // WindowServer (or more correctly its Displays) may have state that needs to |
| 97 // be destroyed before GpuState as well. | 97 // be destroyed before GpuState as well. |
| 98 window_server_.reset(); | 98 window_server_.reset(); |
| 99 |
| 100 #if defined(USE_OZONE) |
| 101 OzonePlatform::Shutdown(); |
| 102 #endif |
| 99 } | 103 } |
| 100 | 104 |
| 101 void Service::InitializeResources(service_manager::Connector* connector) { | 105 void Service::InitializeResources(service_manager::Connector* connector) { |
| 102 if (ui::ResourceBundle::HasSharedInstance()) | 106 if (ui::ResourceBundle::HasSharedInstance()) |
| 103 return; | 107 return; |
| 104 | 108 |
| 105 std::set<std::string> resource_paths; | 109 std::set<std::string> resource_paths; |
| 106 resource_paths.insert(kResourceFileStrings); | 110 resource_paths.insert(kResourceFileStrings); |
| 107 resource_paths.insert(kResourceFile100); | 111 resource_paths.insert(kResourceFile100); |
| 108 resource_paths.insert(kResourceFile200); | 112 resource_paths.insert(kResourceFile200); |
| (...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 365 mojom::WindowServerTestRequest request) { | 369 mojom::WindowServerTestRequest request) { |
| 366 if (!test_config_) | 370 if (!test_config_) |
| 367 return; | 371 return; |
| 368 mojo::MakeStrongBinding( | 372 mojo::MakeStrongBinding( |
| 369 base::MakeUnique<ws::WindowServerTestImpl>(window_server_.get()), | 373 base::MakeUnique<ws::WindowServerTestImpl>(window_server_.get()), |
| 370 std::move(request)); | 374 std::move(request)); |
| 371 } | 375 } |
| 372 | 376 |
| 373 | 377 |
| 374 } // namespace ui | 378 } // namespace ui |
| OLD | NEW |