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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 if (ui::ResourceBundle::HasSharedInstance()) | 102 if (ui::ResourceBundle::HasSharedInstance()) |
103 return; | 103 return; |
104 | 104 |
105 std::set<std::string> resource_paths; | 105 std::set<std::string> resource_paths; |
106 resource_paths.insert(kResourceFileStrings); | 106 resource_paths.insert(kResourceFileStrings); |
107 resource_paths.insert(kResourceFile100); | 107 resource_paths.insert(kResourceFile100); |
108 resource_paths.insert(kResourceFile200); | 108 resource_paths.insert(kResourceFile200); |
109 | 109 |
110 catalog::ResourceLoader loader; | 110 catalog::ResourceLoader loader; |
111 filesystem::mojom::DirectoryPtr directory; | 111 filesystem::mojom::DirectoryPtr directory; |
112 connector->ConnectToInterface(catalog::mojom::kServiceName, &directory); | 112 connector->BindInterface(catalog::mojom::kServiceName, &directory); |
113 CHECK(loader.OpenFiles(std::move(directory), resource_paths)); | 113 CHECK(loader.OpenFiles(std::move(directory), resource_paths)); |
114 | 114 |
115 ui::RegisterPathProvider(); | 115 ui::RegisterPathProvider(); |
116 | 116 |
117 // Initialize resource bundle with 1x and 2x cursor bitmaps. | 117 // Initialize resource bundle with 1x and 2x cursor bitmaps. |
118 ui::ResourceBundle::InitSharedInstanceWithPakFileRegion( | 118 ui::ResourceBundle::InitSharedInstanceWithPakFileRegion( |
119 loader.TakeFile(kResourceFileStrings), | 119 loader.TakeFile(kResourceFileStrings), |
120 base::MemoryMappedFile::Region::kWholeFile); | 120 base::MemoryMappedFile::Region::kWholeFile); |
121 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); | 121 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); |
122 rb.AddDataPackFromFile(loader.TakeFile(kResourceFile100), | 122 rb.AddDataPackFromFile(loader.TakeFile(kResourceFile100), |
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
376 mojom::WindowServerTestRequest request) { | 376 mojom::WindowServerTestRequest request) { |
377 if (!test_config_) | 377 if (!test_config_) |
378 return; | 378 return; |
379 mojo::MakeStrongBinding( | 379 mojo::MakeStrongBinding( |
380 base::MakeUnique<ws::WindowServerTestImpl>(window_server_.get()), | 380 base::MakeUnique<ws::WindowServerTestImpl>(window_server_.get()), |
381 std::move(request)); | 381 std::move(request)); |
382 } | 382 } |
383 | 383 |
384 | 384 |
385 } // namespace ui | 385 } // namespace ui |
OLD | NEW |