1// Copyright (c) 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.graphics.Bitmap;
8import android.view.View;
9
10/**
11 * A minimal interface for a View to implement to be shown in a Tab. The main implementation of
12 * this is ContentView but other Views can also implement this, enabling them to be shown in a Tab
13 * as well.
14 */
15public interface PageInfo {
16    /**
17     * @return The URL of the page.
18     */
19    String getUrl();
20
21    /**
22     * @return The title of the page.
23     */
24    String getTitle();
25
26    /**
27     * @return True, if the view is in a suitable state for a snapshot.
28     */
29    boolean isReadyForSnapshot();
30
31    /**
32     * @return An unscaled screenshot of the page.
33     */
34    Bitmap getBitmap();
35
36    /**
37     * @return A screenshot of the page scaled to the specified size.
38     */
39    Bitmap getBitmap(int width, int height);
40
41    /**
42     * @return The background color of the page.
43     */
44    int getBackgroundColor();
45
46    /**
47     * @return The View to display the page. This is always non-null.
48     */
49    View getView();
50}
51