OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2015 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.chrome.browser.compositor.layouts; | |
6 | |
7 import org.chromium.chrome.browser.compositor.layouts.components.LayoutTab; | |
8 | |
9 /** | |
10 * {@link LayoutRenderHost} is the minimal interface the layouts need to know ab out its host to | |
11 * update. | |
12 */ | |
13 public interface LayoutUpdateHost { | |
14 /** | |
15 * Requests a next update to refresh the transforms and changing properties. The update occurs | |
16 * once a frame. This is requesting a new frame to be updated and rendered ( no need to call | |
17 * {@link LayoutRenderHost#requestRender()}). | |
18 */ | |
19 void requestUpdate(); | |
20 | |
21 /** | |
22 * Tells its host {@link android.view.View} that the hide will be an animati on away. | |
23 * This is to be called from a {@link Layout}. | |
24 * @param nextTabId The id of the next tab. | |
25 * @param hintAtTabSelection Whether or not to hint about a new tab being se lected. | |
26 */ | |
27 void startHiding(int nextTabId, boolean hintAtTabSelection); | |
28 | |
29 /** | |
30 * Tells its host {@link android.view.View} that the Layout has done all ani mation so the view | |
31 * can hide. This is to be called from a {@link Layout}. | |
32 */ | |
33 void doneHiding(); | |
34 | |
35 /** | |
36 * Tells its host that the Layout is done it's preliminary showing animation . | |
37 */ | |
38 void doneShowing(); | |
39 | |
40 /** | |
41 * @param layout The {@link Layout} being evaluated. | |
42 * @return Whether the given {@link Layout} is being displayed. | |
43 */ | |
44 boolean isActiveLayout(Layout layout); | |
45 | |
46 /** | |
47 * Initializes {@link org.chromium.chrome.browser.compositor.layouts.compone nts.LayoutTab} with | |
48 * data accessible only from the {@link LayoutUpdateHost} such as data extra cted out of a | |
49 * {@link com.google.android.apps.chrome.tab.ChromeTab}. | |
Yaron
2015/03/09 14:23:39
Change to Tab
David Trainor- moved to gerrit
2015/03/09 20:02:42
Done.
| |
50 * | |
51 * @param tabId The id of the | |
52 * {@link org.chromium.chrome.browser.compositor.layouts.compon ents.LayoutTab} | |
53 * to be initialized from a {@link com.google.android.apps.chro me.tab.ChromeTab}. | |
Yaron
2015/03/09 14:23:39
Here too
David Trainor- moved to gerrit
2015/03/09 20:02:42
Done.
| |
54 */ | |
55 void initLayoutTabFromHost(final int tabId); | |
56 | |
57 /** | |
58 * Creates or recycles a {@Link LayoutTab}. | |
59 * | |
60 * @param id The id of the reference tab in the | |
61 * {@link org.chromium.chrome.browser.tabmodel.TabMo del}. | |
62 * @param incognito Whether the new tab is incognito. | |
63 * @param showCloseButton True to show and activate a close button on the b order. | |
64 * @param isTitleNeeded Whether a title will be shown. | |
65 * @param maxContentWidth The maximum layout width this tab can be. Negati ve numbers will use | |
66 * the original content width. | |
67 * @param maxContentHeight The maximum layout height this tab can be. Negat ive numbers will use | |
68 * the original content height. | |
69 * @return The created or recycled {@link LayoutTab}. | |
70 */ | |
71 LayoutTab createLayoutTab(int id, boolean incognito, boolean showCloseButton , | |
72 boolean isTitleNeeded, float maxContentWidth, float maxContentHeight ); | |
73 | |
74 /** | |
75 * Notifies the host that the {@link LayoutTab} is no longer needed by the l ayout. | |
76 * | |
77 * @param id The id of the reference tab in the | |
78 * {@link org.chromium.chrome.browser.tabmodel.TabModel}. | |
79 */ | |
80 void releaseTabLayout(int id); | |
81 } | |
OLD | NEW |