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

Unified Diff: android_webview/java/src/org/chromium/android_webview/AwContentVideoViewDelegate.java

Issue 11280284: onShowCustomView (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: actually using it .... Created 8 years 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: android_webview/java/src/org/chromium/android_webview/AwContentVideoViewDelegate.java
diff --git a/android_webview/java/src/org/chromium/android_webview/AwContentVideoViewDelegate.java b/android_webview/java/src/org/chromium/android_webview/AwContentVideoViewDelegate.java
new file mode 100644
index 0000000000000000000000000000000000000000..0802408fe0daef5ec0380fb66abe70b7b8a7db7c
--- /dev/null
+++ b/android_webview/java/src/org/chromium/android_webview/AwContentVideoViewDelegate.java
@@ -0,0 +1,61 @@
+// 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.android_webview;
+
+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;
joth 2012/12/08 00:17:58 most of these look unneeded?
acleung 2013/01/07 23:40:03 Done.
+
+import org.chromium.android_webview.AwContentsClient;
+import org.chromium.android_webview.AwResource;
+import org.chromium.content.browser.ContentVideoViewContextDelegate;
+import org.chromium.content.R;
joth 2012/12/08 00:17:58 needed?
acleung 2013/01/07 23:40:03 Done.
+
+/**
+ * Uses an exisiting Activity to handle displaying video in full screen.
joth 2012/12/08 00:17:58 nit: reference to activity here is misleading. Key
acleung 2013/01/07 23:40:03 Good point. How do you like the updated version?
+ */
+public class AwContentVideoViewDelegate implements ContentVideoViewContextDelegate {
+ private AwContentsClient mAwContentsClient;
+ private Context mContext;
+
+ public AwContentVideoViewDelegate(AwContentsClient client, Context context) {
+ this.mAwContentsClient = client;
+ this.mContext = context;
+ }
+
+ public void onShowCustomView(View view) {
+ mAwContentsClient.onShowCustomView(view);
joth 2012/12/08 00:17:58 note in WebChromeClient we also need to pass 'int
acleung 2013/01/07 23:40:03 Make sense. Seems like there are more changes need
+ }
+
+ public void onDestroyContentVideoView() {
joth 2012/12/08 00:17:58 mAwContentsClient.onHideCustomView(view); ?
acleung 2013/01/07 23:40:03 Done.
+ }
+
+ public Context getContext() {
+ return mContext;
+ }
+
+ public String getPlayBackErrorText() {
+ return AwResource.getVideoInvalidPlayback();
+ }
+
+ public String getUnknownErrorText() {
+ return AwResource.getVideoErrorUnknown();
+ }
+
+ public String getErrorButton() {
+ return AwResource.getVideoErrorButton();
+ }
+
+ public String getErrorTitle() {
+ return AwResource.getVideoErrorTitle();
+ }
+
+ public String getVideoLoadingText() {
+ return AwResource.getVideoLoading();
+ }
+}

Powered by Google App Engine
This is Rietveld 408576698