ContentVideoViewClient.java revision a3f6a49ab37290eeeb8db0f41ec0f1cb74a68be7
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
5package org.chromium.content.browser;
6
7import 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 */
20public 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     */
25    public void onShowCustomView(View view);
26
27    /**
28     * Called when it's time to destroy the video view. Must be implemented.
29     */
30    public void onDestroyContentVideoView();
31
32    /**
33     * Allows the embedder to replace the view indicating that the video is loading.
34     * If null is returned, the default video loading view is used.
35     */
36    public View getVideoLoadingProgressView();
37}
38