mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 803293 - Remove some old code from BrowserApp. r=mfinkle
This commit is contained in:
parent
3e476bcb7f
commit
d270784541
@ -93,12 +93,15 @@ abstract public class BrowserApp extends GeckoApp
|
|||||||
switch(msg) {
|
switch(msg) {
|
||||||
case LOCATION_CHANGE:
|
case LOCATION_CHANGE:
|
||||||
if (Tabs.getInstance().isSelectedTab(tab)) {
|
if (Tabs.getInstance().isSelectedTab(tab)) {
|
||||||
String url = tab.getURL();
|
maybeCancelFaviconLoad(tab);
|
||||||
if (url.equals("about:home"))
|
}
|
||||||
|
// fall through
|
||||||
|
case SELECTED:
|
||||||
|
if (Tabs.getInstance().isSelectedTab(tab)) {
|
||||||
|
if ("about:home".equals(tab.getURL()))
|
||||||
showAboutHome();
|
showAboutHome();
|
||||||
else
|
else
|
||||||
hideAboutHome();
|
hideAboutHome();
|
||||||
maybeCancelFaviconLoad(tab);
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case LOAD_ERROR:
|
case LOAD_ERROR:
|
||||||
@ -109,12 +112,6 @@ abstract public class BrowserApp extends GeckoApp
|
|||||||
invalidateOptionsMenu();
|
invalidateOptionsMenu();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case SELECTED:
|
|
||||||
if ("about:home".equals(tab.getURL()))
|
|
||||||
showAboutHome();
|
|
||||||
else
|
|
||||||
hideAboutHome();
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
super.onTabChanged(tab, msg, data);
|
super.onTabChanged(tab, msg, data);
|
||||||
}
|
}
|
||||||
@ -270,26 +267,12 @@ abstract public class BrowserApp extends GeckoApp
|
|||||||
|
|
||||||
mDoorHangerPopup.setAnchor(mBrowserToolbar.mFavicon);
|
mDoorHangerPopup.setAnchor(mBrowserToolbar.mFavicon);
|
||||||
|
|
||||||
Intent intent = getIntent();
|
|
||||||
String action = intent.getAction();
|
|
||||||
String args = intent.getStringExtra("args");
|
|
||||||
if (args != null && args.contains("-profile")) {
|
|
||||||
Pattern p = Pattern.compile("(?:-profile\\s*)(\\w*)(\\s*)");
|
|
||||||
Matcher m = p.matcher(args);
|
|
||||||
if (m.find()) {
|
|
||||||
mBrowserToolbar.setTitle(null);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!isExternalURL) {
|
if (!isExternalURL) {
|
||||||
// show about:home if we aren't restoring previous session
|
// show about:home if we aren't restoring previous session
|
||||||
if (mRestoreMode == GeckoAppShell.RESTORE_NONE) {
|
if (mRestoreMode == GeckoAppShell.RESTORE_NONE) {
|
||||||
Tab tab = Tabs.getInstance().loadUrl("about:home", Tabs.LOADURL_NEW_TAB);
|
Tab tab = Tabs.getInstance().loadUrl("about:home", Tabs.LOADURL_NEW_TAB);
|
||||||
tab.updateTitle(null);
|
|
||||||
showAboutHome();
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
hideAboutHome();
|
|
||||||
Tabs.getInstance().loadUrl(uri, Tabs.LOADURL_NEW_TAB | Tabs.LOADURL_USER_ENTERED);
|
Tabs.getInstance().loadUrl(uri, Tabs.LOADURL_NEW_TAB | Tabs.LOADURL_USER_ENTERED);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1642,6 +1642,8 @@ abstract public class GeckoApp
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Tabs.registerOnTabsChangedListener(this);
|
||||||
|
|
||||||
initializeChrome(passedUri, isExternalURL);
|
initializeChrome(passedUri, isExternalURL);
|
||||||
|
|
||||||
if (mRestoreMode == GeckoAppShell.RESTORE_NONE) {
|
if (mRestoreMode == GeckoAppShell.RESTORE_NONE) {
|
||||||
@ -1669,8 +1671,6 @@ abstract public class GeckoApp
|
|||||||
Log.i(LOGTAG, "Intent : ACTION_DEBUG - waiting 5s before launching");
|
Log.i(LOGTAG, "Intent : ACTION_DEBUG - waiting 5s before launching");
|
||||||
}
|
}
|
||||||
|
|
||||||
Tabs.registerOnTabsChangedListener(this);
|
|
||||||
|
|
||||||
if (cameraView == null) {
|
if (cameraView == null) {
|
||||||
cameraView = new SurfaceView(this);
|
cameraView = new SurfaceView(this);
|
||||||
cameraView.getHolder().setType(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS);
|
cameraView.getHolder().setType(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS);
|
||||||
|
Loading…
Reference in New Issue
Block a user