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

Unified Diff: ui/views/mus/aura_init.cc

Issue 1674903003: Extract shell methods from ApplicationImpl into a base class, and pass this to Initialize() instead. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mojom
Patch Set: . Created 4 years, 10 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 | « ui/views/mus/aura_init.h ('k') | ui/views/mus/native_widget_mus.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/mus/aura_init.cc
diff --git a/ui/views/mus/aura_init.cc b/ui/views/mus/aura_init.cc
index f7f30b0f24a70bd1b0d5cb857f3de3f924723782..19fdd90d93d08caa6969f53c31a4ce01f4c999a5 100644
--- a/ui/views/mus/aura_init.cc
+++ b/ui/views/mus/aura_init.cc
@@ -11,7 +11,7 @@
#include "base/path_service.h"
#include "build/build_config.h"
#include "components/resource_provider/public/cpp/resource_loader.h"
-#include "mojo/shell/public/cpp/application_impl.h"
+#include "mojo/shell/public/cpp/shell.h"
#include "ui/aura/env.h"
#include "ui/base/ime/input_method_initializer.h"
#include "ui/base/resource/resource_bundle.h"
@@ -50,12 +50,12 @@ class MusViewsDelegate : public ViewsDelegate {
} // namespace
-AuraInit::AuraInit(mojo::ApplicationImpl* app, const std::string& resource_file)
+AuraInit::AuraInit(mojo::Shell* shell, const std::string& resource_file)
: resource_file_(resource_file),
views_delegate_(new MusViewsDelegate) {
aura::Env::CreateInstance(false);
- InitializeResources(app);
+ InitializeResources(shell);
ui::InitializeInputMethodForTesting();
}
@@ -72,11 +72,11 @@ AuraInit::~AuraInit() {
#endif
}
-void AuraInit::InitializeResources(mojo::ApplicationImpl* app) {
+void AuraInit::InitializeResources(mojo::Shell* shell) {
if (ui::ResourceBundle::HasSharedInstance())
return;
resource_provider::ResourceLoader resource_loader(
- app, GetResourcePaths(resource_file_));
+ shell, GetResourcePaths(resource_file_));
if (!resource_loader.BlockUntilLoaded())
return;
CHECK(resource_loader.loaded());
@@ -90,7 +90,7 @@ void AuraInit::InitializeResources(mojo::ApplicationImpl* app) {
// Initialize the skia font code to go ask fontconfig underneath.
#if defined(OS_LINUX) && !defined(OS_ANDROID)
- font_loader_ = skia::AdoptRef(new font_service::FontLoader(app->shell()));
+ font_loader_ = skia::AdoptRef(new font_service::FontLoader(shell));
SkFontConfigInterface::SetGlobal(font_loader_.get());
#endif
« no previous file with comments | « ui/views/mus/aura_init.h ('k') | ui/views/mus/native_widget_mus.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698