a2555e23674c380c6021077959ebead5e19542d0
[platform/framework/web/crosswalk.git] / src / xwalk / runtime / android / core / src / org / xwalk / core / XWalkContentVideoViewClient.java
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.
4
5 package org.xwalk.core;
6
7 import android.app.Activity;
8 import android.content.Context;
9 import android.view.View;
10 import android.view.WindowManager;
11
12 import org.chromium.content.browser.ContentVideoViewClient;
13 import org.xwalk.core.XWalkWebChromeClient.CustomViewCallback;
14
15 class XWalkContentVideoViewClient implements ContentVideoViewClient {
16     private XWalkContentsClient mContentsClient;
17     private Activity mActivity;
18
19     public XWalkContentVideoViewClient(XWalkContentsClient client, Activity activity) {
20         mContentsClient = client;
21         mActivity = activity;
22     }
23
24     @Override
25     public void onShowCustomView(View view) {
26         CustomViewCallback cb = new CustomViewCallback() {
27             @Override
28             public void onCustomViewHidden() {
29             }
30         };
31         mContentsClient.onShowCustomView(view, cb);
32     }
33
34     @Override
35     public void onDestroyContentVideoView() {
36         mContentsClient.onHideCustomView();
37     }
38
39     @Override
40     public View getVideoLoadingProgressView() {
41         return mContentsClient.getVideoLoadingProgressView();
42     }
43 }