1868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles)// Copyright 2013 The Chromium Authors. All rights reserved. 2868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles)// Use of this source code is governed by a BSD-style license that can be 3868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles)// found in the LICENSE file. 4868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles) 5868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles)package org.chromium.content.browser; 6868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles) 7868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles)import android.view.View; 8868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles) 9868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles)/** 10868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles) * Main callback class used by ContentVideoView. 11868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles) * 127dbb3d5cf0c15f500944d211057644d6a2f37371Ben Murdoch * This contains the superset of callbacks that must be implemented by the embedder. 13868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles) * 14868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles) * onShowCustomView and onDestoryContentVideoView must be implemented, 15868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles) * getVideoLoadingProgressView() is optional, and may return null if not required. 16868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles) * 17868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles) * The implementer is responsible for displaying the Android view when 18868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles) * {@link #onShowCustomView(View)} is called. 19868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles) */ 20868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles)public interface ContentVideoViewClient { 217dbb3d5cf0c15f500944d211057644d6a2f37371Ben Murdoch /** 227dbb3d5cf0c15f500944d211057644d6a2f37371Ben Murdoch * Called when the video view is ready to be shown. Must be implemented. 237dbb3d5cf0c15f500944d211057644d6a2f37371Ben Murdoch * @param view The view to show. 245c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu * @return whether the video is actually shown. 257dbb3d5cf0c15f500944d211057644d6a2f37371Ben Murdoch */ 265c02ac1a9c1b504631c0a3d2b6e737b5d738bae1Bo Liu public boolean onShowCustomView(View view); 277dbb3d5cf0c15f500944d211057644d6a2f37371Ben Murdoch 287dbb3d5cf0c15f500944d211057644d6a2f37371Ben Murdoch /** 297dbb3d5cf0c15f500944d211057644d6a2f37371Ben Murdoch * Called when it's time to destroy the video view. Must be implemented. 307dbb3d5cf0c15f500944d211057644d6a2f37371Ben Murdoch */ 31868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles) public void onDestroyContentVideoView(); 327dbb3d5cf0c15f500944d211057644d6a2f37371Ben Murdoch 337dbb3d5cf0c15f500944d211057644d6a2f37371Ben Murdoch /** 347dbb3d5cf0c15f500944d211057644d6a2f37371Ben Murdoch * Allows the embedder to replace the view indicating that the video is loading. 357dbb3d5cf0c15f500944d211057644d6a2f37371Ben Murdoch * If null is returned, the default video loading view is used. 367dbb3d5cf0c15f500944d211057644d6a2f37371Ben Murdoch */ 37868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles) public View getVideoLoadingProgressView(); 38868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles)} 39