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

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: Update tests 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
7 /** 9 /**
8 * An interface for notifications about the state of the bottom sheet. 10 * An interface for notifications about the state of the bottom sheet.
9 */ 11 */
10 public interface BottomSheetObserver { 12 public interface BottomSheetObserver {
11 /** 13 /**
12 * A notification that the sheet has been opened, meaning the sheet is any h eight greater 14 * A notification that the sheet has been opened, meaning the sheet is any h eight greater
13 * than its peeking state. 15 * than its peeking state.
14 */ 16 */
15 void onSheetOpened(); 17 void onSheetOpened();
16 18
(...skipping 23 matching lines...) Expand all
40 * state. Once the sheet is outside the peek-half range, this event will no longer be 42 * 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 43 * 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 44 * 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. 45 * the peeking state, this event will be called a single time with 1.0f.
44 * 46 *
45 * @param transitionFraction The fraction of the way to the half expanded st ate that the 47 * @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 48 * sheet is. This will be 0.0f when the sheet is p eeking and 1.0f
47 * when the sheet is half expanded. 49 * when the sheet is half expanded.
48 */ 50 */
49 void onTransitionPeekToHalf(float transitionFraction); 51 void onTransitionPeekToHalf(float transitionFraction);
52
53 /**
54 * An event for when the sheet changes state.
55 * @param newState The new sheet state. See {@link BottomSheet.SheetState}.
56 */
57 void onSheetStateChanged(int newState);
mdjones 2017/03/17 18:17:26 @SheetState
Theresa 2017/03/17 20:26:30 Done.
58
59 /**
60 * An event for when the sheet content changes.
61 * @param newContent The new {@link BottomSheetContent}.
62 */
63 void onSheetContentChanged(BottomSheetContent newContent);
50 } 64 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698