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 /** |
| 8 * Exposes the current overview mode state as well as a way to listen to overvie
w mode state |
| 9 * changes. |
| 10 */ |
| 11 public interface OverviewModeBehavior { |
| 12 /** |
| 13 * An observer that is notified when the overview mode state changes. |
| 14 */ |
| 15 public interface OverviewModeObserver { |
| 16 /** |
| 17 * Called when overview mode starts showing. |
| 18 * @param showToolbar Whether or not to show the normal toolbar when ani
mating into overview |
| 19 * mode. |
| 20 */ |
| 21 void onOverviewModeStartedShowing(boolean showToolbar); |
| 22 |
| 23 /** |
| 24 * Called when overview mode finishes showing. |
| 25 */ |
| 26 void onOverviewModeFinishedShowing(); |
| 27 |
| 28 /** |
| 29 * Called when overview mode starts hiding. |
| 30 * @param showToolbar Whether or not to show the normal toolbar when
animating out of |
| 31 * overview mode. |
| 32 * @param delayAnimation Whether or not to delay any related overview an
imations until after |
| 33 * overview mode is finished hiding. |
| 34 */ |
| 35 void onOverviewModeStartedHiding(boolean showToolbar, boolean delayAnima
tion); |
| 36 |
| 37 /** |
| 38 * Called when overview mode finishes hiding. |
| 39 */ |
| 40 void onOverviewModeFinishedHiding(); |
| 41 } |
| 42 |
| 43 /** |
| 44 * @return Whether or not the overview {@link Layout} is visible. |
| 45 */ |
| 46 boolean overviewVisible(); |
| 47 |
| 48 /** |
| 49 * @param listener Registers {@code listener} for overview mode status chang
es. |
| 50 */ |
| 51 void addOverviewModeObserver(OverviewModeObserver listener); |
| 52 |
| 53 /** |
| 54 * @param listener Unregisters {@code listener} for overview mode status cha
nges. |
| 55 */ |
| 56 void removeOverviewModeObserver(OverviewModeObserver listener); |
| 57 } |
OLD | NEW |