use of org.chromium.chrome.browser.tab.Tab in project AndroidChromium by JackyAndroid.
the class CompositorViewHolder method internalInit.
private void internalInit() {
mTabObserver = new EmptyTabObserver() {
@Override
public void onContentChanged(Tab tab) {
CompositorViewHolder.this.onContentChanged();
}
};
mEnableCompositorTabStrip = DeviceFormFactor.isTablet(getContext());
addOnLayoutChangeListener(new OnLayoutChangeListener() {
@Override
public void onLayoutChange(View v, int left, int top, int right, int bottom, int oldLeft, int oldTop, int oldRight, int oldBottom) {
propagateViewportToLayouts(right - left, bottom - top);
// in so the full page is shown.
if (mPostHideKeyboardTask != null) {
new Handler().postDelayed(mPostHideKeyboardTask, 30);
mPostHideKeyboardTask = null;
}
}
});
mCompositorView = new CompositorView(getContext(), this);
// mCompositorView should always be the first child.
addView(mCompositorView, 0, new FrameLayout.LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT));
}
use of org.chromium.chrome.browser.tab.Tab in project AndroidChromium by JackyAndroid.
the class CompositorViewHolder method onContentChanged.
@Override
public void onContentChanged() {
if (mTabModelSelector == null) {
// setTabModelSelector.
return;
}
Tab tab = mTabModelSelector.getCurrentTab();
setTab(tab);
}
use of org.chromium.chrome.browser.tab.Tab in project AndroidChromium by JackyAndroid.
the class LayerTitleCache method buildUpdatedTitle.
@CalledByNative
private void buildUpdatedTitle(int tabId) {
if (mTabModelSelector == null)
return;
Tab tab = mTabModelSelector.getTabById(tabId);
if (tab == null)
return;
getUpdatedTitle(tab, "");
}
use of org.chromium.chrome.browser.tab.Tab in project AndroidChromium by JackyAndroid.
the class LocationBarPhone method updateVisualsForState.
@Override
public void updateVisualsForState() {
super.updateVisualsForState();
Tab tab = getCurrentTab();
boolean isIncognito = tab != null && tab.isIncognito();
mIncognitoBadge.setVisibility(isIncognito ? VISIBLE : GONE);
updateIncognitoBadgePadding();
}
use of org.chromium.chrome.browser.tab.Tab in project AndroidChromium by JackyAndroid.
the class LocationBarLayout method backKeyPressed.
private void backKeyPressed() {
hideSuggestions();
UiUtils.hideKeyboard(mUrlBar);
// Revert the URL to match the current page.
setUrlToPageUrl();
// Focus the page.
Tab currentTab = getCurrentTab();
if (currentTab != null)
currentTab.requestFocus();
}
Aggregations