Index: content/public/android/java/src/org/chromium/content/browser/ActivityContentVideoViewClient.java |
diff --git a/content/public/android/java/src/org/chromium/content/browser/ActivityContentVideoViewDelegate.java b/content/public/android/java/src/org/chromium/content/browser/ActivityContentVideoViewClient.java |
similarity index 76% |
rename from content/public/android/java/src/org/chromium/content/browser/ActivityContentVideoViewDelegate.java |
rename to content/public/android/java/src/org/chromium/content/browser/ActivityContentVideoViewClient.java |
index 7b1a521b46f35a69e941941bb791f6fadee09e88..75d8df5e695d776390db3477d91f58a71da46703 100644 |
--- a/content/public/android/java/src/org/chromium/content/browser/ActivityContentVideoViewDelegate.java |
+++ b/content/public/android/java/src/org/chromium/content/browser/ActivityContentVideoViewClient.java |
@@ -5,22 +5,22 @@ |
package org.chromium.content.browser; |
import android.app.Activity; |
-import android.content.Context; |
import android.view.Gravity; |
import android.view.View; |
import android.view.ViewGroup; |
import android.view.WindowManager; |
import android.widget.FrameLayout; |
-import org.chromium.content.browser.ContentVideoViewContextDelegate; |
+import org.chromium.content.browser.ContentVideoViewClient; |
/** |
- * Uses an exisiting Activity to handle displaying video in full screen. |
+ * Uses an existing Activity to handle displaying video in full screen. |
*/ |
-public class ActivityContentVideoViewDelegate implements ContentVideoViewContextDelegate { |
+public class ActivityContentVideoViewClient implements ContentVideoViewClient { |
private Activity mActivity; |
+ private View mView; |
- public ActivityContentVideoViewDelegate(Activity activity) { |
+ public ActivityContentVideoViewClient(Activity activity) { |
this.mActivity = activity; |
} |
@@ -35,11 +35,15 @@ public class ActivityContentVideoViewDelegate implements ContentVideoViewContext |
ViewGroup.LayoutParams.MATCH_PARENT, |
ViewGroup.LayoutParams.MATCH_PARENT, |
Gravity.CENTER)); |
+ mView = view; |
} |
@Override |
public void onDestroyContentVideoView() { |
mActivity.getWindow().clearFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN); |
+ FrameLayout decor = (FrameLayout) mActivity.getWindow().getDecorView(); |
+ decor.removeView(mView); |
+ mView = null; |
} |
@Override |
@@ -52,11 +56,6 @@ public class ActivityContentVideoViewDelegate implements ContentVideoViewContext |
} |
@Override |
- public Context getContext() { |
- return mActivity; |
- } |
- |
- @Override |
public View getVideoLoadingProgressView() { |
return null; |
} |