// Copyright 2020 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
package org.chromium.chrome.browser.feed;
import android.view.View;
import androidx.annotation.Nullable;
import org.chromium.components.browser_ui.bottomsheet.BottomSheetContent;
/** Provide data that the bottom sheet manager needs to show a bottom sheet. */
public class CardMenuBottomSheetContent implements BottomSheetContent {
private View mContentView;
public CardMenuBottomSheetContent(View view) {
mContentView = view;
}
@Override
public View getContentView() {
return mContentView;
}
@Nullable
@Override
public View getToolbarView() {
return null;
}
@Override
public int getVerticalScrollOffset() {
return 0;
}
@Override
public void destroy() {}
@Override
public int getPriority() {
return BottomSheetContent.ContentPriority.HIGH;
}
@Override
public boolean swipeToDismissEnabled() {
return false;
}
@Override
public int getPeekHeight() {
return BottomSheetContent.HeightMode.DISABLED;
}
@Override
public float getFullHeightRatio() {
return BottomSheetContent.HeightMode.WRAP_CONTENT;
}
@Override
public int getSheetContentDescriptionStringId() {
return R.string.feed_card_menu_description;
}
@Override
public int getSheetHalfHeightAccessibilityStringId() {
return R.string.feed_card_menu_opened_half;
}
@Override
public int getSheetFullHeightAccessibilityStringId() {
return R.string.feed_card_menu_opened_full;
}
@Override
public int getSheetClosedAccessibilityStringId() {
return R.string.feed_card_menu_closed;
}
}