Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(509)

Unified Diff: components/mus/mus_app.cc

Issue 1942473002: Eliminate mojo:resource_provider (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/mus/DEPS ('k') | components/resource_provider/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/mus/mus_app.cc
diff --git a/components/mus/mus_app.cc b/components/mus/mus_app.cc
index be7350fb566ba52e4959a2ada0461ffcf827ee93..4a1e149d17eb701b3231bbc4383c7fa265c186e3 100644
--- a/components/mus/mus_app.cc
+++ b/components/mus/mus_app.cc
@@ -24,8 +24,8 @@
#include "components/mus/ws/window_tree_binding.h"
#include "components/mus/ws/window_tree_factory.h"
#include "components/mus/ws/window_tree_host_factory.h"
-#include "components/resource_provider/public/cpp/resource_loader.h"
#include "mojo/public/c/system/main.h"
+#include "services/catalog/public/cpp/resource_loader.h"
#include "services/shell/public/cpp/connection.h"
#include "services/shell/public/cpp/connector.h"
#include "services/tracing/public/cpp/tracing_impl.h"
@@ -91,19 +91,21 @@ void MandolineUIServicesApp::InitializeResources(shell::Connector* connector) {
resource_paths.insert(kResourceFile100);
resource_paths.insert(kResourceFile200);
- resource_provider::ResourceLoader loader(connector, resource_paths);
- if (!loader.BlockUntilLoaded())
- return;
+ catalog::ResourceLoader loader;
+ filesystem::DirectoryPtr directory;
+ connector->ConnectToInterface("mojo:catalog", &directory);
+ CHECK(loader.OpenFiles(std::move(directory), resource_paths));
+
ui::RegisterPathProvider();
// Initialize resource bundle with 1x and 2x cursor bitmaps.
ui::ResourceBundle::InitSharedInstanceWithPakFileRegion(
- loader.ReleaseFile(kResourceFileStrings),
+ loader.TakeFile(kResourceFileStrings),
base::MemoryMappedFile::Region::kWholeFile);
ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
- rb.AddDataPackFromFile(loader.ReleaseFile(kResourceFile100),
+ rb.AddDataPackFromFile(loader.TakeFile(kResourceFile100),
ui::SCALE_FACTOR_100P);
- rb.AddDataPackFromFile(loader.ReleaseFile(kResourceFile200),
+ rb.AddDataPackFromFile(loader.TakeFile(kResourceFile200),
ui::SCALE_FACTOR_200P);
}
« no previous file with comments | « components/mus/DEPS ('k') | components/resource_provider/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698