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

Side by Side Diff: chrome/android/java/src/org/chromium/chrome/browser/widget/BottomSheetObserver.java

Issue 2753773006: [Home] Move bottom sheet classes to widget/bottomsheet (Closed)
Patch Set: Fix bottom_sheet_bottom_nav.xml Created 3 years, 9 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 2017 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.widget;
6
7 /**
8 * An interface for notifications about the state of the bottom sheet.
9 */
10 public interface BottomSheetObserver {
11 /**
12 * A notification that the sheet has been opened, meaning the sheet is any h eight greater
13 * than its peeking state.
14 */
15 void onSheetOpened();
16
17 /**
18 * A notification that the sheet has closed, meaning the sheet has reached i ts peeking state.
19 */
20 void onSheetClosed();
21
22 /**
23 * A notification that the sheet has begun loading a URL.
24 *
25 * @param url The URL being loaded.
26 */
27 void onLoadUrl(String url);
28
29 /**
30 * An event for when the sheet's offset from the bottom of the screen change s.
31 *
32 * @param heightFraction The fraction of the way to the fully expanded state that the sheet
33 * is. This will be 0.0f when the sheet is peeking and 1.0f when the
34 * sheet is completely expanded.
35 */
36 void onSheetOffsetChanged(float heightFraction);
37
38 /**
39 * An event for when the sheet is transitioning from the peeking state to th e half expanded
40 * state. Once the sheet is outside the peek-half range, this event will no longer be
41 * called. This event is guaranteed to be called at least once with 0.0f in the peeking state
42 * and 1.0f at or past the half state. This means if the sheet is set to the full state from
43 * the peeking state, this event will be called a single time with 1.0f.
44 *
45 * @param transitionFraction The fraction of the way to the half expanded st ate that the
46 * sheet is. This will be 0.0f when the sheet is p eeking and 1.0f
47 * when the sheet is half expanded.
48 */
49 void onTransitionPeekToHalf(float transitionFraction);
50 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698