/** * Updates the current button states and calls appropriate abstract visibility methods, giving * inheriting classes the chance to update the button visuals as well. */ private void updateButtonStatus() { Tab currentTab = mToolbarModel.getTab(); boolean tabCrashed = currentTab != null && currentTab.isShowingSadTab(); mToolbar.updateBackButtonVisibility(currentTab != null && currentTab.canGoBack()); mToolbar.updateForwardButtonVisibility(currentTab != null && currentTab.canGoForward()); updateReloadState(tabCrashed); updateBookmarkButtonStatus(); mToolbar .getMenuButton() .setVisibility(mToolbar.shouldShowMenuButton() ? View.VISIBLE : View.GONE); }