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

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

Issue 13669003: Refactoring ContentVideoViewContextDelegate.java (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix tests Created 7 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
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;
}

Powered by Google App Engine
This is Rietveld 408576698