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

Unified Diff: content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java

Issue 13669003: Refactoring ContentVideoViewContextDelegate.java (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: using weak reference in native side Created 7 years, 8 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: content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
diff --git a/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java b/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
index 9b8cde61ef94cdbf6f262c24e2cc6553a9fc680b..f44c61a8d0b5e576a5d5eb408c6a163c54bd5d47 100644
--- a/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
+++ b/content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
@@ -268,6 +268,7 @@ public class ContentViewCore implements MotionEventDelegate, NavigationClient {
/**
* @return The context used for creating this ContentViewCore.
*/
+ @CalledByNative
public Context getContext() {
return mContext;
}
@@ -2645,6 +2646,11 @@ public class ContentViewCore implements MotionEventDelegate, NavigationClient {
getContentViewClient().onExternalVideoSurfaceRequested(playerId);
joth 2013/04/12 17:56:24 TODO move this method to ContentVideoClient?
michaelbai 2013/04/18 18:21:59 This is used by Google TV, not sure we should move
}
+ @CalledByNative
+ private ContentVideoViewClient getContentVideoViewClient() {
+ return mContentViewClient.getContentVideoViewClient();
joth 2013/04/12 17:56:24 as the native side only holds a weak ref, I think
michaelbai 2013/04/18 18:21:59 I don't understand why it could be prematurely GCe
+ }
+
private native int nativeInit(boolean hardwareAccelerated, boolean inputEventsDeliveredAtVSync,
int webContentsPtr, int windowAndroidPtr);

Powered by Google App Engine
This is Rietveld 408576698