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

Unified Diff: mash/wallpaper/wallpaper.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 | « mash/task_viewer/task_viewer_application_delegate.cc ('k') | mash/wm/accelerator_registrar_apptest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mash/wallpaper/wallpaper.cc
diff --git a/mash/wallpaper/wallpaper.cc b/mash/wallpaper/wallpaper.cc
index 6739d10aaafcffb0cb0d8a998a17a129d11734f1..ab50ddcfdf1adb71fde158935ec50f7e52f64c7d 100644
--- a/mash/wallpaper/wallpaper.cc
+++ b/mash/wallpaper/wallpaper.cc
@@ -11,8 +11,8 @@
#include "mojo/services/tracing/public/cpp/tracing_impl.h"
#include "mojo/shell/public/cpp/application_connection.h"
#include "mojo/shell/public/cpp/application_delegate.h"
-#include "mojo/shell/public/cpp/application_impl.h"
#include "mojo/shell/public/cpp/application_runner.h"
+#include "mojo/shell/public/cpp/shell.h"
#include "ui/gfx/canvas.h"
#include "ui/views/mus/aura_init.h"
#include "ui/views/mus/native_widget_mus.h"
@@ -50,15 +50,16 @@ class WallpaperApplicationDelegate : public mojo::ApplicationDelegate {
private:
// mojo::ApplicationDelegate:
- void Initialize(mojo::ApplicationImpl* app) override {
- tracing_.Initialize(app);
+ void Initialize(mojo::Shell* shell, const std::string& url,
+ uint32_t id) override {
+ tracing_.Initialize(shell, url);
- aura_init_.reset(new views::AuraInit(app, "views_mus_resources.pak"));
- views::WindowManagerConnection::Create(app);
+ aura_init_.reset(new views::AuraInit(shell, "views_mus_resources.pak"));
+ views::WindowManagerConnection::Create(shell);
scoped_refptr<PrefRegistrySimple> registry = new PrefRegistrySimple;
registry->RegisterStringPref("filename", "", 0);
- pref_service_ = filesystem::CreatePrefService(app, registry.get());
+ pref_service_ = filesystem::CreatePrefService(shell, registry.get());
pref_service_->AddPrefInitObserver(base::Bind(
&WallpaperApplicationDelegate::OnLoaded, base::Unretained(this)));
@@ -74,7 +75,7 @@ class WallpaperApplicationDelegate : public mojo::ApplicationDelegate {
mus::Window* window =
views::WindowManagerConnection::Get()->NewWindow(properties);
params.native_widget = new views::NativeWidgetMus(
- widget, app->shell(), window, mus::mojom::SurfaceType::DEFAULT);
+ widget, shell, window, mus::mojom::SurfaceType::DEFAULT);
widget->Init(params);
widget->Show();
}
« no previous file with comments | « mash/task_viewer/task_viewer_application_delegate.cc ('k') | mash/wm/accelerator_registrar_apptest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698