| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "ash/mus/sysui_application.h" | 5 #include "ash/mus/sysui_application.h" |
| 6 | 6 |
| 7 #include <map> | 7 #include <map> |
| 8 #include <set> | 8 #include <set> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 241 void InitializeResourceBundle(::shell::Connector* connector) { | 241 void InitializeResourceBundle(::shell::Connector* connector) { |
| 242 if (ui::ResourceBundle::HasSharedInstance()) | 242 if (ui::ResourceBundle::HasSharedInstance()) |
| 243 return; | 243 return; |
| 244 | 244 |
| 245 std::set<std::string> resource_paths; | 245 std::set<std::string> resource_paths; |
| 246 resource_paths.insert(kResourceFileStrings); | 246 resource_paths.insert(kResourceFileStrings); |
| 247 resource_paths.insert(kResourceFile100); | 247 resource_paths.insert(kResourceFile100); |
| 248 resource_paths.insert(kResourceFile200); | 248 resource_paths.insert(kResourceFile200); |
| 249 | 249 |
| 250 catalog::ResourceLoader loader; | 250 catalog::ResourceLoader loader; |
| 251 filesystem::DirectoryPtr directory; | 251 filesystem::mojom::DirectoryPtr directory; |
| 252 connector->ConnectToInterface("mojo:catalog", &directory); | 252 connector->ConnectToInterface("mojo:catalog", &directory); |
| 253 CHECK(loader.OpenFiles(std::move(directory), resource_paths)); | 253 CHECK(loader.OpenFiles(std::move(directory), resource_paths)); |
| 254 | 254 |
| 255 // Load ash resources and en-US strings; not 'common' (Chrome) resources. | 255 // Load ash resources and en-US strings; not 'common' (Chrome) resources. |
| 256 // TODO(msw): Check ResourceBundle::IsScaleFactorSupported; load 300% etc. | 256 // TODO(msw): Check ResourceBundle::IsScaleFactorSupported; load 300% etc. |
| 257 ui::ResourceBundle::InitSharedInstanceWithPakFileRegion( | 257 ui::ResourceBundle::InitSharedInstanceWithPakFileRegion( |
| 258 loader.TakeFile(kResourceFileStrings), | 258 loader.TakeFile(kResourceFileStrings), |
| 259 base::MemoryMappedFile::Region::kWholeFile); | 259 base::MemoryMappedFile::Region::kWholeFile); |
| 260 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); | 260 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); |
| 261 rb.AddDataPackFromFile(loader.TakeFile(kResourceFile100), | 261 rb.AddDataPackFromFile(loader.TakeFile(kResourceFile100), |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 324 void SysUIApplication::Create( | 324 void SysUIApplication::Create( |
| 325 ::shell::Connection* connection, | 325 ::shell::Connection* connection, |
| 326 mojo::InterfaceRequest<mash::shelf::mojom::ShelfController> request) { | 326 mojo::InterfaceRequest<mash::shelf::mojom::ShelfController> request) { |
| 327 mash::shelf::mojom::ShelfController* shelf_controller = | 327 mash::shelf::mojom::ShelfController* shelf_controller = |
| 328 static_cast<ShelfDelegateMus*>(Shell::GetInstance()->GetShelfDelegate()); | 328 static_cast<ShelfDelegateMus*>(Shell::GetInstance()->GetShelfDelegate()); |
| 329 shelf_controller_bindings_.AddBinding(shelf_controller, std::move(request)); | 329 shelf_controller_bindings_.AddBinding(shelf_controller, std::move(request)); |
| 330 } | 330 } |
| 331 | 331 |
| 332 } // namespace sysui | 332 } // namespace sysui |
| 333 } // namespace ash | 333 } // namespace ash |
| OLD | NEW |