Chromium Code Reviews| Index: chrome/android/java/src/org/chromium/chrome/browser/widget/bottomsheet/BottomSheetContentController.java |
| diff --git a/chrome/android/java/src/org/chromium/chrome/browser/widget/bottomsheet/BottomSheetContentController.java b/chrome/android/java/src/org/chromium/chrome/browser/widget/bottomsheet/BottomSheetContentController.java |
| index ce847d9dbc7a462baacb9c19ea589a39d892a777..244e105b07ea86c5c84e4d09a5810bd6b7892dc0 100644 |
| --- a/chrome/android/java/src/org/chromium/chrome/browser/widget/bottomsheet/BottomSheetContentController.java |
| +++ b/chrome/android/java/src/org/chromium/chrome/browser/widget/bottomsheet/BottomSheetContentController.java |
| @@ -15,6 +15,7 @@ import android.util.AttributeSet; |
| import android.view.MenuItem; |
| import android.view.View; |
| +import org.chromium.base.VisibleForTesting; |
| import org.chromium.chrome.R; |
| import org.chromium.chrome.browser.bookmarks.BookmarkSheetContent; |
| import org.chromium.chrome.browser.download.DownloadSheetContent; |
| @@ -184,4 +185,15 @@ public class BottomSheetContentController extends BottomNavigationView |
| mBottomSheet.showContent(getSheetContentForId(mSelectedItemId)); |
| } |
| + |
| + /** |
| + * @param itemId The id of the MenuItem to select. |
| + */ |
| + @VisibleForTesting |
| + public void selectItem(int itemId) { |
|
gone
2017/03/21 17:46:51
If this is only meant for testing, call it that so
Theresa
2017/03/21 22:29:24
Done.
|
| + // TODO(twellington): A #setSelectedItemId() method was added to the support library |
| + // recently. Replace this custom implementation with that method after |
| + // the support library is rolled. |
| + onNavigationItemSelected(getMenu().findItem(itemId)); |
| + } |
| } |