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/bind.h" | 9 #include "base/bind.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 void MandolineUIServicesApp::InitializeResources(shell::Connector* connector) { | 90 void MandolineUIServicesApp::InitializeResources(shell::Connector* connector) { |
91 if (ui::ResourceBundle::HasSharedInstance()) | 91 if (ui::ResourceBundle::HasSharedInstance()) |
92 return; | 92 return; |
93 | 93 |
94 std::set<std::string> resource_paths; | 94 std::set<std::string> resource_paths; |
95 resource_paths.insert(kResourceFileStrings); | 95 resource_paths.insert(kResourceFileStrings); |
96 resource_paths.insert(kResourceFile100); | 96 resource_paths.insert(kResourceFile100); |
97 resource_paths.insert(kResourceFile200); | 97 resource_paths.insert(kResourceFile200); |
98 | 98 |
99 catalog::ResourceLoader loader; | 99 catalog::ResourceLoader loader; |
100 filesystem::DirectoryPtr directory; | 100 filesystem::mojom::DirectoryPtr directory; |
101 connector->ConnectToInterface("mojo:catalog", &directory); | 101 connector->ConnectToInterface("mojo:catalog", &directory); |
102 CHECK(loader.OpenFiles(std::move(directory), resource_paths)); | 102 CHECK(loader.OpenFiles(std::move(directory), resource_paths)); |
103 | 103 |
104 ui::RegisterPathProvider(); | 104 ui::RegisterPathProvider(); |
105 | 105 |
106 // Initialize resource bundle with 1x and 2x cursor bitmaps. | 106 // Initialize resource bundle with 1x and 2x cursor bitmaps. |
107 ui::ResourceBundle::InitSharedInstanceWithPakFileRegion( | 107 ui::ResourceBundle::InitSharedInstanceWithPakFileRegion( |
108 loader.TakeFile(kResourceFileStrings), | 108 loader.TakeFile(kResourceFileStrings), |
109 base::MemoryMappedFile::Region::kWholeFile); | 109 base::MemoryMappedFile::Region::kWholeFile); |
110 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); | 110 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); |
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
289 platform_display_init_params_.display_bounds = bounds; | 289 platform_display_init_params_.display_bounds = bounds; |
290 platform_display_init_params_.display_id = id; | 290 platform_display_init_params_.display_id = id; |
291 | 291 |
292 // Display manages its own lifetime. | 292 // Display manages its own lifetime. |
293 ws::Display* host_impl = | 293 ws::Display* host_impl = |
294 new ws::Display(window_server_.get(), platform_display_init_params_); | 294 new ws::Display(window_server_.get(), platform_display_init_params_); |
295 host_impl->Init(nullptr); | 295 host_impl->Init(nullptr); |
296 } | 296 } |
297 | 297 |
298 } // namespace mus | 298 } // namespace mus |
OLD | NEW |