• Home
  • History
  • Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 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.chromium.content.browser;
6 
7 import android.view.View;
8 
9 /**
10  *  Main callback class used by ContentVideoView.
11  *
12  *  This contains the superset of callbacks that must be implemented by the embedder.
13  *
14  *  onShowCustomView and onDestoryContentVideoView must be implemented,
15  *  getVideoLoadingProgressView() is optional, and may return null if not required.
16  *
17  *  The implementer is responsible for displaying the Android view when
18  *  {@link #onShowCustomView(View)} is called.
19  */
20 public interface ContentVideoViewClient {
21     /**
22      * Called when the video view is ready to be shown. Must be implemented.
23      * @param view The view to show.
24      * @return whether the video is actually shown.
25      */
onShowCustomView(View view)26     public boolean onShowCustomView(View view);
27 
28     /**
29      * Called when it's time to destroy the video view. Must be implemented.
30      */
onDestroyContentVideoView()31     public void onDestroyContentVideoView();
32 
33     /**
34      * Allows the embedder to replace the view indicating that the video is loading.
35      * If null is returned, the default video loading view is used.
36      */
getVideoLoadingProgressView()37     public View getVideoLoadingProgressView();
38 }
39