use of acr.browser.lightning.view.LightningView in project Lightning-Browser by anthonycr.
the class BrowserPresenter method loadUrlInCurrentView.
/**
* Loads a URL in the current tab.
*
* @param url the URL to load, must
* not be null.
*/
public void loadUrlInCurrentView(@NonNull final String url) {
final LightningView currentTab = mTabsModel.getCurrentTab();
if (currentTab == null) {
// This is a problem, probably an assert will be better than a return
return;
}
currentTab.loadUrl(url);
}
use of acr.browser.lightning.view.LightningView in project Lightning-Browser by anthonycr.
the class TabsManager method resumeAll.
/**
* Method used to resume all the tabs in the browser.
* This is necessary because we cannot pause the
* WebView when the app is open currently due to a
* bug in the WebView, where calling onResume doesn't
* consistently resume it.
*
* @param context the context needed to initialize
* the LightningView preferences.
*/
public void resumeAll(@NonNull Context context) {
LightningView current = getCurrentTab();
if (current != null) {
current.resumeTimers();
}
for (LightningView tab : mTabList) {
if (tab != null) {
tab.onResume();
tab.initializePreferences(context);
}
}
}
Aggregations