import android.net.Uri;
import android.util.Log;
import android.view.KeyEvent;
+import org.chromium.content.browser.ContentVideoView;
class XWalkWebContentsDelegateAdapter extends XWalkWebContentsDelegate {
@Override
public boolean addNewContents(boolean isDialog, boolean isUserGesture) {
- // TODO: implement.
- return false;
+ return mXWalkContentsClient.onCreateWindow(isDialog, isUserGesture);
}
@Override
@Override
public void toggleFullscreen(boolean enterFullscreen) {
+ if (!enterFullscreen) {
+ ContentVideoView videoView = ContentVideoView.getContentVideoView();
+ if (videoView != null) videoView.exitFullscreen(false);
+ }
if (mXWalkContentsClient != null) mXWalkContentsClient.onToggleFullscreen(enterFullscreen);
}