Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright (c) 2012 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 package org.chromium.android_webview; | |
| 5 | |
| 6 import android.app.Activity; | |
| 7 import android.content.Context; | |
| 8 import android.view.Gravity; | |
| 9 import android.view.View; | |
| 10 import android.view.ViewGroup; | |
| 11 import android.view.WindowManager; | |
| 12 import android.widget.FrameLayout; | |
|
joth
2012/12/08 00:17:58
most of these look unneeded?
acleung
2013/01/07 23:40:03
Done.
| |
| 13 | |
| 14 import org.chromium.android_webview.AwContentsClient; | |
| 15 import org.chromium.android_webview.AwResource; | |
| 16 import org.chromium.content.browser.ContentVideoViewContextDelegate; | |
| 17 import org.chromium.content.R; | |
|
joth
2012/12/08 00:17:58
needed?
acleung
2013/01/07 23:40:03
Done.
| |
| 18 | |
| 19 /** | |
| 20 * 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?
| |
| 21 */ | |
| 22 public class AwContentVideoViewDelegate implements ContentVideoViewContextDelega te { | |
| 23 private AwContentsClient mAwContentsClient; | |
| 24 private Context mContext; | |
| 25 | |
| 26 public AwContentVideoViewDelegate(AwContentsClient client, Context context) { | |
| 27 this.mAwContentsClient = client; | |
| 28 this.mContext = context; | |
| 29 } | |
| 30 | |
| 31 public void onShowCustomView(View view) { | |
| 32 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
| |
| 33 } | |
| 34 | |
| 35 public void onDestroyContentVideoView() { | |
|
joth
2012/12/08 00:17:58
mAwContentsClient.onHideCustomView(view); ?
acleung
2013/01/07 23:40:03
Done.
| |
| 36 } | |
| 37 | |
| 38 public Context getContext() { | |
| 39 return mContext; | |
| 40 } | |
| 41 | |
| 42 public String getPlayBackErrorText() { | |
| 43 return AwResource.getVideoInvalidPlayback(); | |
| 44 } | |
| 45 | |
| 46 public String getUnknownErrorText() { | |
| 47 return AwResource.getVideoErrorUnknown(); | |
| 48 } | |
| 49 | |
| 50 public String getErrorButton() { | |
| 51 return AwResource.getVideoErrorButton(); | |
| 52 } | |
| 53 | |
| 54 public String getErrorTitle() { | |
| 55 return AwResource.getVideoErrorTitle(); | |
| 56 } | |
| 57 | |
| 58 public String getVideoLoadingText() { | |
| 59 return AwResource.getVideoLoading(); | |
| 60 } | |
| 61 } | |
| OLD | NEW |