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.chrome.browser;
6
7import android.view.View;
8
9/**
10 * An interface for pages that will be shown in a tab using Android views instead of html.
11 */
12public interface NativePage {
13    /**
14     * @return The View to display the page. This is always non-null.
15     */
16    View getView();
17
18    /**
19     * @return The title of the page.
20     */
21    String getTitle();
22
23    /**
24     * @return The URL of the page.
25     */
26    String getUrl();
27
28    /**
29     * @return The hostname for this page, e.g. "newtab" or "bookmarks".
30     */
31    String getHost();
32
33    /**
34     * @return The background color of the page.
35     */
36    int getBackgroundColor();
37
38    /**
39     * Updates the native page based on the given url.
40     */
41    void updateForUrl(String url);
42
43    /**
44     * Called after a page has been removed from the view hierarchy and will no longer be used.
45     */
46    void destroy();
47}
48