1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 package org.xwalk.core;
7 import android.app.Activity;
8 import android.content.Context;
9 import android.view.View;
10 import android.view.WindowManager;
12 import org.chromium.content.browser.ContentVideoViewClient;
13 import org.xwalk.core.XWalkWebChromeClient.CustomViewCallback;
15 class XWalkContentVideoViewClient implements ContentVideoViewClient {
16 private XWalkContentsClient mContentsClient;
17 private Activity mActivity;
19 public XWalkContentVideoViewClient(XWalkContentsClient client, Activity activity) {
20 mContentsClient = client;
25 public void onShowCustomView(View view) {
26 CustomViewCallback cb = new CustomViewCallback() {
28 public void onCustomViewHidden() {
31 mContentsClient.onShowCustomView(view, cb);
35 public void onDestroyContentVideoView() {
36 mContentsClient.onHideCustomView();
40 public View getVideoLoadingProgressView() {
41 return mContentsClient.getVideoLoadingProgressView();