use of org.chromium.chrome.browser.compositor.layouts.phone.StackLayout in project AndroidChromium by JackyAndroid.
the class ChromeTabbedActivity method toggleOverview.
private void toggleOverview() {
Tab currentTab = getActivityTab();
ContentViewCore contentViewCore = currentTab != null ? currentTab.getContentViewCore() : null;
if (!mLayoutManager.overviewVisible()) {
getCompositorViewHolder().hideKeyboard(new Runnable() {
@Override
public void run() {
mLayoutManager.showOverview(true);
}
});
if (contentViewCore != null) {
contentViewCore.setAccessibilityState(false);
}
} else {
Layout activeLayout = mLayoutManager.getActiveLayout();
if (activeLayout instanceof StackLayout) {
((StackLayout) activeLayout).commitOutstandingModelState(LayoutManager.time());
}
if (getCurrentTabModel().getCount() != 0) {
// Don't hide overview if current tab stack is empty()
mLayoutManager.hideOverview(true);
// hideOverview could change the current tab. Update the local variables.
currentTab = getActivityTab();
contentViewCore = currentTab != null ? currentTab.getContentViewCore() : null;
if (contentViewCore != null) {
contentViewCore.setAccessibilityState(true);
}
}
}
}
use of org.chromium.chrome.browser.compositor.layouts.phone.StackLayout in project AndroidChromium by JackyAndroid.
the class LayoutManagerDocumentTabSwitcher method toggleOverview.
public void toggleOverview() {
Tab tab = getTabModelSelector().getCurrentTab();
ContentViewCore contentViewCore = tab != null ? tab.getContentViewCore() : null;
if (!overviewVisible()) {
mHost.hideKeyboard(new Runnable() {
@Override
public void run() {
showOverview(true);
}
});
if (contentViewCore != null) {
contentViewCore.setAccessibilityState(false);
}
} else {
Layout activeLayout = getActiveLayout();
if (activeLayout instanceof StackLayout) {
((StackLayout) activeLayout).commitOutstandingModelState(LayoutManager.time());
}
if (getTabModelSelector().getCurrentModel().getCount() != 0) {
// Don't hide overview if current tab stack is empty()
hideOverview(true);
// hideOverview could change the current tab. Update the local variables.
tab = getTabModelSelector().getCurrentTab();
contentViewCore = tab != null ? tab.getContentViewCore() : null;
if (contentViewCore != null) {
contentViewCore.setAccessibilityState(true);
}
}
}
}
Aggregations