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

Unified Diff: mojo/shell/context.cc

Issue 404913002: Break dependency of native_viewport_service on mojo::shell::Context (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Move call to GetApplicationContext() to native_viewport_android Created 6 years, 5 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 | « mojo/shell/context.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/shell/context.cc
diff --git a/mojo/shell/context.cc b/mojo/shell/context.cc
index 0eba764383ac43cd1403220fb563d7513fe5ebab..7400d1ce6cb7bbdff1d6db39f6064f1335697e7b 100644
--- a/mojo/shell/context.cc
+++ b/mojo/shell/context.cc
@@ -65,21 +65,20 @@ static base::LazyInstance<Setup>::Leaky setup = LAZY_INSTANCE_INITIALIZER;
class Context::NativeViewportServiceLoader : public ServiceLoader {
public:
- explicit NativeViewportServiceLoader(Context* context) : context_(context) {}
+ NativeViewportServiceLoader() {}
virtual ~NativeViewportServiceLoader() {}
private:
virtual void LoadService(ServiceManager* manager,
const GURL& url,
ScopedMessagePipeHandle shell_handle) OVERRIDE {
- app_.reset(::CreateNativeViewportService(context_, shell_handle.Pass()));
+ app_.reset(services::CreateNativeViewportService(shell_handle.Pass()));
}
virtual void OnServiceError(ServiceManager* manager,
const GURL& url) OVERRIDE {
}
- Context* context_;
scoped_ptr<ApplicationImpl> app_;
DISALLOW_COPY_AND_ASSIGN(NativeViewportServiceLoader);
};
@@ -108,14 +107,14 @@ Context::Context()
service_manager_.SetLoaderForURL(
scoped_ptr<ServiceLoader>(
new UIServiceLoader(
- scoped_ptr<ServiceLoader>(new NativeViewportServiceLoader(this)),
+ scoped_ptr<ServiceLoader>(new NativeViewportServiceLoader()),
this)),
GURL("mojo:mojo_native_viewport_service"));
#else
service_manager_.SetLoaderForURL(
scoped_ptr<ServiceLoader>(
new BackgroundServiceLoader(
- scoped_ptr<ServiceLoader>(new NativeViewportServiceLoader(this)),
+ scoped_ptr<ServiceLoader>(new NativeViewportServiceLoader()),
"native_viewport",
base::MessageLoop::TYPE_UI)),
GURL("mojo:mojo_native_viewport_service"));
« no previous file with comments | « mojo/shell/context.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698