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

Unified Diff: ui/platform_window/android/java/src/org/chromium/ui/PlatformWindowAndroid.java

Issue 1180573004: android: Introduce a ui::PlatformWindow implementation for android. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix-win-gn Created 5 years, 6 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/platform_window/android/DEPS ('k') | ui/platform_window/android/platform_window_android.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/platform_window/android/java/src/org/chromium/ui/PlatformWindowAndroid.java
diff --git a/components/view_manager/native_viewport/android/src/org/chromium/mojo/PlatformViewportAndroid.java b/ui/platform_window/android/java/src/org/chromium/ui/PlatformWindowAndroid.java
similarity index 89%
rename from components/view_manager/native_viewport/android/src/org/chromium/mojo/PlatformViewportAndroid.java
rename to ui/platform_window/android/java/src/org/chromium/ui/PlatformWindowAndroid.java
index 330ef85c39fdc739330dd98d719bb8de84e85a87..19d96b49028969cb4b792c06852c8813ca57782a 100644
--- a/components/view_manager/native_viewport/android/src/org/chromium/mojo/PlatformViewportAndroid.java
+++ b/ui/platform_window/android/java/src/org/chromium/ui/PlatformWindowAndroid.java
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-package org.chromium.mojo;
+package org.chromium.ui;
import android.app.Activity;
import android.content.Context;
@@ -19,21 +19,21 @@ import org.chromium.base.JNINamespace;
/**
* Exposes SurfaceView to native code.
*/
-@JNINamespace("native_viewport")
-public class PlatformViewportAndroid extends SurfaceView {
+@JNINamespace("ui")
+public class PlatformWindowAndroid extends SurfaceView {
private long mNativeMojoViewport;
private final SurfaceHolder.Callback mSurfaceCallback;
@CalledByNative
- public static PlatformViewportAndroid createForActivity(
+ public static PlatformWindowAndroid createForActivity(
Activity activity, long nativeViewport) {
- PlatformViewportAndroid rv = new PlatformViewportAndroid(activity, nativeViewport);
+ PlatformWindowAndroid rv = new PlatformWindowAndroid(activity, nativeViewport);
activity.setContentView(rv);
return rv;
}
- public PlatformViewportAndroid(Context context, long nativeViewport) {
+ public PlatformWindowAndroid(Context context, long nativeViewport) {
super(context);
setFocusable(true);
@@ -164,21 +164,21 @@ public class PlatformViewportAndroid extends SurfaceView {
}
}
- private static native void nativeDestroy(long nativePlatformViewportAndroid);
+ private static native void nativeDestroy(long nativePlatformWindowAndroid);
private static native void nativeSurfaceCreated(
- long nativePlatformViewportAndroid, Surface surface, float devicePixelRatio);
+ long nativePlatformWindowAndroid, Surface surface, float devicePixelRatio);
private static native void nativeSurfaceDestroyed(
- long nativePlatformViewportAndroid);
+ long nativePlatformWindowAndroid);
private static native void nativeSurfaceSetSize(
- long nativePlatformViewportAndroid, int width, int height, float density);
+ long nativePlatformWindowAndroid, int width, int height, float density);
- private static native boolean nativeTouchEvent(long nativePlatformViewportAndroid, long timeMs,
+ private static native boolean nativeTouchEvent(long nativePlatformWindowAndroid, long timeMs,
int maskedAction, int pointerId, float x, float y, float pressure, float touchMajor,
float touchMinor, float orientation, float hWheel, float vWheel);
private static native boolean nativeKeyEvent(
- long nativePlatformViewportAndroid, boolean pressed, int keyCode, int unicodeCharacter);
+ long nativePlatformWindowAndroid, boolean pressed, int keyCode, int unicodeCharacter);
}
« no previous file with comments | « ui/platform_window/android/DEPS ('k') | ui/platform_window/android/platform_window_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698