| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 package org.chromium.content_shell; | 5 package org.chromium.content_shell; |
| 6 | 6 |
| 7 import android.app.Activity; | 7 import android.app.Activity; |
| 8 import android.content.Context; | 8 import android.content.Context; |
| 9 import android.util.AttributeSet; | 9 import android.util.AttributeSet; |
| 10 import android.view.LayoutInflater; | 10 import android.view.LayoutInflater; |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 * Constructor for inflating via XML. | 43 * Constructor for inflating via XML. |
| 44 */ | 44 */ |
| 45 public ShellManager(final Context context, AttributeSet attrs) { | 45 public ShellManager(final Context context, AttributeSet attrs) { |
| 46 super(context, attrs); | 46 super(context, attrs); |
| 47 nativeInit(this); | 47 nativeInit(this); |
| 48 mContentViewClient = new ContentViewClient() { | 48 mContentViewClient = new ContentViewClient() { |
| 49 @Override | 49 @Override |
| 50 public ContentVideoViewEmbedder getContentVideoViewEmbedder() { | 50 public ContentVideoViewEmbedder getContentVideoViewEmbedder() { |
| 51 return new ActivityContentVideoViewEmbedder((Activity) context)
{ | 51 return new ActivityContentVideoViewEmbedder((Activity) context)
{ |
| 52 @Override | 52 @Override |
| 53 public void enterFullscreenVideo(View view) { | 53 public void enterFullscreenVideo(View view, boolean isVideoL
oaded) { |
| 54 super.enterFullscreenVideo(view); | 54 super.enterFullscreenVideo(view, isVideoLoaded); |
| 55 setOverlayVideoMode(true); | 55 setOverlayVideoMode(true); |
| 56 } | 56 } |
| 57 | 57 |
| 58 @Override | 58 @Override |
| 59 public void exitFullscreenVideo() { | 59 public void exitFullscreenVideo() { |
| 60 super.exitFullscreenVideo(); | 60 super.exitFullscreenVideo(); |
| 61 setOverlayVideoMode(false); | 61 setOverlayVideoMode(false); |
| 62 } | 62 } |
| 63 }; | 63 }; |
| 64 } | 64 } |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 184 public void destroy() { | 184 public void destroy() { |
| 185 // Remove active shell (Currently single shell support only available). | 185 // Remove active shell (Currently single shell support only available). |
| 186 removeShell(mActiveShell); | 186 removeShell(mActiveShell); |
| 187 mContentViewRenderView.destroy(); | 187 mContentViewRenderView.destroy(); |
| 188 mContentViewRenderView = null; | 188 mContentViewRenderView = null; |
| 189 } | 189 } |
| 190 | 190 |
| 191 private static native void nativeInit(Object shellManagerInstance); | 191 private static native void nativeInit(Object shellManagerInstance); |
| 192 private static native void nativeLaunchShell(String url); | 192 private static native void nativeLaunchShell(String url); |
| 193 } | 193 } |
| OLD | NEW |