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

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

Issue 2698613006: [Home] Add lifecycle events and some tests (Closed)
Patch Set: fix previous patch Created 3 years, 10 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
1 // Copyright 2017 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 package org.chromium.chrome.browser.widget; 5 package org.chromium.chrome.browser.widget;
6 6
7 /** 7 /**
8 * An interface for notifications about the state of the bottom sheet. 8 * An interface for notifications about the state of the bottom sheet.
9 */ 9 */
10 public interface BottomSheetObserver { 10 public interface BottomSheetObserver {
11 /** 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 * @param url The URL being loaded.
25 */
26 void onLoadUrl(String url);
27
28 /**
12 * An event for when the sheet is transitioning from the peeking state to th e half expanded 29 * An event for when the sheet is transitioning from the peeking state to th e half expanded
13 * state. Once the sheet is outside the peek-half range, this event will no longer be 30 * state. Once the sheet is outside the peek-half range, this event will no longer be
14 * called. 31 * called.
15 * @param transitionFraction The fraction of the way to the half expanded st ate that the 32 * @param transitionFraction The fraction of the way to the half expanded st ate that the
16 * sheet is. This will be 0.0f when the sheet is p eeking and 1.0f 33 * sheet is. This will be 0.0f when the sheet is p eeking and 1.0f
17 * when the sheet is half expanded. 34 * when the sheet is half expanded.
18 */ 35 */
19 void onTransitionPeekToHalf(float transitionFraction); 36 void onTransitionPeekToHalf(float transitionFraction);
20 } 37 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698