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

Unified Diff: services/native_viewport/platform_viewport_android.cc

Issue 2011053003: Make PlatformViewport and NativeViewportImpl use Shell* instead of ApplicationImpl*. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: fix android 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
Index: services/native_viewport/platform_viewport_android.cc
diff --git a/services/native_viewport/platform_viewport_android.cc b/services/native_viewport/platform_viewport_android.cc
index 7ce2f34b408856c851f5cf8241d02b7846a149ae..625c8fa893e7e94a6eadfe97235323933d351f6b 100644
--- a/services/native_viewport/platform_viewport_android.cc
+++ b/services/native_viewport/platform_viewport_android.cc
@@ -12,7 +12,6 @@
#include "jni/PlatformViewportAndroid_jni.h"
#include "mojo/converters/geometry/geometry_type_converters.h"
#include "mojo/converters/input_events/input_events_type_converters.h"
-#include "mojo/public/cpp/application/application_impl.h"
#include "mojo/public/cpp/application/connect.h"
#include "services/native_viewport/native_viewport_support.mojom.h"
#include "ui/events/event.h"
@@ -55,10 +54,9 @@ bool PlatformViewportAndroid::Register(JNIEnv* env) {
return RegisterNativesImpl(env);
}
-PlatformViewportAndroid::PlatformViewportAndroid(
- mojo::ApplicationImpl* application,
- Delegate* delegate)
- : application_(application),
+PlatformViewportAndroid::PlatformViewportAndroid(mojo::Shell* shell,
+ Delegate* delegate)
+ : shell_(shell),
delegate_(delegate),
window_(NULL),
id_generator_(0),
@@ -167,7 +165,7 @@ void PlatformViewportAndroid::Init(const gfx::Rect& bounds) {
Java_PlatformViewportAndroid_createRequest(env,
reinterpret_cast<intptr_t>(this));
- mojo::ConnectToService(application_->shell(), "mojo:native_viewport_support",
+ mojo::ConnectToService(shell_, "mojo:native_viewport_support",
GetProxy(&support_service_));
support_service_->CreateNewNativeWindow(
base::Bind(&PlatformViewportAndroid::Close, weak_factory_.GetWeakPtr()));
@@ -208,11 +206,10 @@ void PlatformViewportAndroid::ReleaseWindow() {
// PlatformViewport, public:
// static
-scoped_ptr<PlatformViewport> PlatformViewport::Create(
- mojo::ApplicationImpl* application_,
- Delegate* delegate) {
+scoped_ptr<PlatformViewport> PlatformViewport::Create(mojo::Shell* shell,
+ Delegate* delegate) {
return scoped_ptr<PlatformViewport>(
- new PlatformViewportAndroid(application_, delegate))
+ new PlatformViewportAndroid(shell, delegate))
.Pass();
}
« no previous file with comments | « services/native_viewport/platform_viewport_android.h ('k') | services/native_viewport/platform_viewport_stub.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698