Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(106)

Side by Side Diff: chrome/android/java_staging/src/org/chromium/chrome/browser/compositor/overlays/strip/StripStacker.java

Issue 1141283003: Upstream oodles of Chrome for Android code into Chromium. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: final patch? Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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.overlays.strip;
6
7 import org.chromium.chrome.browser.compositor.layouts.Layout;
8
9 /**
10 * An interface that defines how to stack tabs and how they should look visually . This lets
11 * certain components customize how the {@link StripLayoutHelper} functions and how other
12 * {@link Layout}s visually order tabs.
13 */
14 public interface StripStacker {
15 /**
16 * @return Whether or not the close button can be shown. Note that even if it can be shown,
17 * it might not be due to how much of the tab is actually visible to preserve proper hit
18 * target sizes.
19 */
20 public boolean canShowCloseButton();
21
22 /**
23 * @return Whether or not the title text can slide to the right to stay visi ble.
24 */
25 public boolean canSlideTitleText();
26
27 /**
28 * This gives the implementing class a chance to determine how the tabs shou ld be ordered
29 * visually. The positioning logic is the same regardless, this just has to do with visual
30 * stacking.
31 *
32 * @param selectedIndex The selected index of the tabs.
33 * @param indexOrderedTabs A list of tabs ordered by index.
34 * @param outVisualOrderedTabs The new list of tabs, ordered from back to fr ont visually.
35 */
36 public void createVisualOrdering(int selectedIndex, StripLayoutTab[] indexOr deredTabs,
37 StripLayoutTab[] outVisualOrderedTabs);
38
39 /**
40 * Performs an occlusion pass, setting the visibility on tabs depending on w hether or not they
41 * overlap each other perfectly. This is relegated to this interface becaus e the implementing
42 * class knows the proper visual order to optimize this pass.
43 * @param selectedIndex The selected index of the tabs.
44 * @param indexOrderedTabs A list of tabs ordered by index.
45 */
46 public void performOcclusionPass(int selectedIndex, StripLayoutTab[] indexOr deredTabs);
47 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698