Java Code Examples for org.chromium.chrome.browser.tabmodel.TabModelUtils#getCurrentTab()
The following examples show how to use
org.chromium.chrome.browser.tabmodel.TabModelUtils#getCurrentTab() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: Stack.java From delion with Apache License 2.0 | 5 votes |
/** * Called when the user has cancelled a swipe; most likely if they have dragged their finger * back to the starting position. Some handlers will throw swipeFinished() instead. * @param time The current time of the app in ms. */ public void swipeCancelled(long time) { if (!mInSwipe) return; mDiscardingTab = null; mInSwipe = false; setWarpState(true, true); mEvenOutProgress = 0.f; // Select the current tab so we exit the switcher. Tab tab = TabModelUtils.getCurrentTab(mTabModel); mLayout.uiSelectingTab(time, tab != null ? tab.getId() : Tab.INVALID_TAB_ID); }
Example 2
Source File: Stack.java From AndroidChromium with Apache License 2.0 | 5 votes |
/** * Called when the user has cancelled a swipe; most likely if they have dragged their finger * back to the starting position. Some handlers will throw swipeFinished() instead. * @param time The current time of the app in ms. */ public void swipeCancelled(long time) { if (!mInSwipe) return; mDiscardingTab = null; mInSwipe = false; setWarpState(true, true); mEvenOutProgress = 0.f; // Select the current tab so we exit the switcher. Tab tab = TabModelUtils.getCurrentTab(mTabModel); mLayout.uiSelectingTab(time, tab != null ? tab.getId() : Tab.INVALID_TAB_ID); }
Example 3
Source File: Stack.java From 365browser with Apache License 2.0 | 5 votes |
/** * Called when the user has cancelled a swipe; most likely if they have dragged their finger * back to the starting position. Some handlers will throw swipeFinished() instead. * @param time The current time of the app in ms. */ public void swipeCancelled(long time) { if (!mInSwipe) return; mDiscardingTab = null; mInSwipe = false; setWarpState(true, true); mEvenOutProgress = 0.f; // Select the current tab so we exit the switcher. Tab tab = TabModelUtils.getCurrentTab(mTabModel); mLayout.uiSelectingTab(time, tab != null ? tab.getId() : Tab.INVALID_TAB_ID); }
Example 4
Source File: ChromeActivity.java From delion with Apache License 2.0 | 2 votes |
/** * Returns the tab being displayed by this ChromeActivity instance. This allows differentiation * between ChromeActivity subclasses that swap between multiple tabs (e.g. ChromeTabbedActivity) * and subclasses that only display one Tab (e.g. FullScreenActivity and DocumentActivity). * * The default implementation grabs the tab currently selected by the TabModel, which may be * null if the Tab does not exist or the system is not initialized. */ public Tab getActivityTab() { return TabModelUtils.getCurrentTab(getCurrentTabModel()); }
Example 5
Source File: ChromeActivity.java From AndroidChromium with Apache License 2.0 | 2 votes |
/** * Returns the tab being displayed by this ChromeActivity instance. This allows differentiation * between ChromeActivity subclasses that swap between multiple tabs (e.g. ChromeTabbedActivity) * and subclasses that only display one Tab (e.g. FullScreenActivity and DocumentActivity). * * The default implementation grabs the tab currently selected by the TabModel, which may be * null if the Tab does not exist or the system is not initialized. */ public Tab getActivityTab() { return TabModelUtils.getCurrentTab(getCurrentTabModel()); }
Example 6
Source File: ChromeActivity.java From 365browser with Apache License 2.0 | 2 votes |
/** * Returns the tab being displayed by this ChromeActivity instance. This allows differentiation * between ChromeActivity subclasses that swap between multiple tabs (e.g. ChromeTabbedActivity) * and subclasses that only display one Tab (e.g. FullScreenActivity and DocumentActivity). * * The default implementation grabs the tab currently selected by the TabModel, which may be * null if the Tab does not exist or the system is not initialized. */ public Tab getActivityTab() { return TabModelUtils.getCurrentTab(getCurrentTabModel()); }