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

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

Issue 2754313002: [Home] Record some user actions for the Chrome Home BottomSheet (Closed)
Patch Set: [Home] Record some user actions for the Chrome Home BottomSheet 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
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.bottomsheet; 5 package org.chromium.chrome.browser.widget.bottomsheet;
6 6
7 import org.chromium.chrome.browser.widget.bottomsheet.BottomSheet.BottomSheetCon tent;
8 import org.chromium.chrome.browser.widget.bottomsheet.BottomSheet.SheetState;
9
7 /** 10 /**
8 * An interface for notifications about the state of the bottom sheet. 11 * An interface for notifications about the state of the bottom sheet.
9 */ 12 */
10 public interface BottomSheetObserver { 13 public interface BottomSheetObserver {
11 /** 14 /**
12 * A notification that the sheet has been opened, meaning the sheet is any h eight greater 15 * A notification that the sheet has been opened, meaning the sheet is any h eight greater
13 * than its peeking state. 16 * than its peeking state.
14 */ 17 */
15 void onSheetOpened(); 18 void onSheetOpened();
16 19
(...skipping 23 matching lines...) Expand all
40 * state. Once the sheet is outside the peek-half range, this event will no longer be 43 * 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 44 * 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 45 * 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. 46 * the peeking state, this event will be called a single time with 1.0f.
44 * 47 *
45 * @param transitionFraction The fraction of the way to the half expanded st ate that the 48 * @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 49 * sheet is. This will be 0.0f when the sheet is p eeking and 1.0f
47 * when the sheet is half expanded. 50 * when the sheet is half expanded.
48 */ 51 */
49 void onTransitionPeekToHalf(float transitionFraction); 52 void onTransitionPeekToHalf(float transitionFraction);
53
54 /**
55 * An event for when the sheet changes state.
56 * @param newState The new sheet state. See {@link SheetState}.
57 */
58 void onSheetStateChanged(@SheetState int newState);
59
60 /**
61 * An event for when the sheet content changes.
62 * @param newContent The new {@link BottomSheetContent}.
63 */
64 void onSheetContentChanged(BottomSheetContent newContent);
50 } 65 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698