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

Unified Diff: content/public/android/java/src/org/chromium/content/browser/ActivityContentVideoViewDelegate.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/ActivityContentVideoViewDelegate.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/ActivityContentVideoViewDelegate.java
deleted file mode 100644
index 7b1a521b46f35a69e941941bb791f6fadee09e88..0000000000000000000000000000000000000000
--- a/content/public/android/java/src/org/chromium/content/browser/ActivityContentVideoViewDelegate.java
+++ /dev/null
@@ -1,63 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-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;
-
-/**
- * Uses an exisiting Activity to handle displaying video in full screen.
- */
-public class ActivityContentVideoViewDelegate implements ContentVideoViewContextDelegate {
- private Activity mActivity;
-
- public ActivityContentVideoViewDelegate(Activity activity) {
- this.mActivity = activity;
- }
-
- @Override
- public void onShowCustomView(View view) {
- mActivity.getWindow().setFlags(
- WindowManager.LayoutParams.FLAG_FULLSCREEN,
- WindowManager.LayoutParams.FLAG_FULLSCREEN);
-
- mActivity.getWindow().addContentView(view,
- new FrameLayout.LayoutParams(
- ViewGroup.LayoutParams.MATCH_PARENT,
- ViewGroup.LayoutParams.MATCH_PARENT,
- Gravity.CENTER));
- }
-
- @Override
- public void onDestroyContentVideoView() {
- mActivity.getWindow().clearFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);
- }
-
- @Override
- public void keepScreenOn(boolean screenOn) {
- if (screenOn) {
- mActivity.getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
- } else {
- mActivity.getWindow().clearFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
- }
- }
-
- @Override
- public Context getContext() {
- return mActivity;
- }
-
- @Override
- public View getVideoLoadingProgressView() {
- return null;
- }
-}

Powered by Google App Engine
This is Rietveld 408576698