Bug 937253 - Remove old unused WebApp code paths r=wesj

--HG--
extra : rebase_source : 50aece0edab6f9a1d137e6120b3ea0aa68ddcdc8
This commit is contained in:
Mark Finkle 2015-01-07 23:52:31 -05:00
parent db6d001abd
commit 2bc0c5ae0c
4 changed files with 6 additions and 28 deletions

View File

@ -142,7 +142,6 @@ public abstract class GeckoApp
public static final String ACTION_LAUNCH_SETTINGS = "org.mozilla.gecko.SETTINGS";
public static final String ACTION_LOAD = "org.mozilla.gecko.LOAD";
public static final String ACTION_INIT_PW = "org.mozilla.gecko.INIT_PW";
public static final String ACTION_WEBAPP_PREFIX = "org.mozilla.gecko.WEBAPP";
public static final String EXTRA_STATE_BUNDLE = "stateBundle";
@ -1849,12 +1848,6 @@ public abstract class GeckoApp
Tabs.getInstance().loadUrl(uri, Tabs.LOADURL_NEW_TAB |
Tabs.LOADURL_USER_ENTERED |
Tabs.LOADURL_EXTERNAL);
} else if (action != null && action.startsWith(ACTION_WEBAPP_PREFIX)) {
// A lightweight mechanism for loading a web page as a webapp
// without installing the app natively nor registering it in the DOM
// application registry.
String uri = getURIFromIntent(intent);
GeckoAppShell.sendEventToGecko(GeckoEvent.createWebappLoadEvent(uri));
} else if (ACTION_HOMESCREEN_SHORTCUT.equals(action)) {
String uri = getURIFromIntent(intent);
GeckoAppShell.sendEventToGecko(GeckoEvent.createBookmarkLoadEvent(uri));

View File

@ -719,13 +719,6 @@ public class GeckoEvent {
return event;
}
public static GeckoEvent createWebappLoadEvent(String uri) {
GeckoEvent event = GeckoEvent.get(NativeGeckoEvent.LOAD_URI);
event.mCharacters = uri;
event.mCharactersExtra = "-webapp";
return event;
}
public static GeckoEvent createBookmarkLoadEvent(String uri) {
GeckoEvent event = GeckoEvent.get(NativeGeckoEvent.LOAD_URI);
event.mCharacters = uri;

View File

@ -120,9 +120,6 @@ public class GeckoThread extends Thread implements GeckoEventListener {
}
private String getTypeFromAction(String action) {
if (action != null && action.startsWith(GeckoApp.ACTION_WEBAPP_PREFIX)) {
return "-webapp";
}
if (GeckoApp.ACTION_HOMESCREEN_SHORTCUT.equals(action)) {
return "-bookmark";
}

View File

@ -478,6 +478,7 @@ var BrowserApp = {
DesktopUserAgent.init();
Distribution.init();
Tabs.init();
SearchEngines.init();
#ifdef ACCESSIBILITY
AccessFu.attach(window);
#endif
@ -486,7 +487,6 @@ var BrowserApp = {
#endif
let url = null;
let pinned = false;
if ("arguments" in window) {
if (window.arguments[0])
url = window.arguments[0];
@ -494,18 +494,11 @@ var BrowserApp = {
gScreenWidth = window.arguments[1];
if (window.arguments[2])
gScreenHeight = window.arguments[2];
if (window.arguments[3])
pinned = window.arguments[3];
}
if (pinned) {
this._initRuntime(this._startupStatus, url, aUrl => this.addTab(aUrl));
} else {
SearchEngines.init();
this.initContextMenu();
}
// The order that context menu items are added is important
// Make sure the "Open in App" context menu item appears at the bottom of the list
this.initContextMenu();
ExternalApps.init();
// XXX maybe we don't do this if the launch was kicked off from external
@ -516,8 +509,9 @@ var BrowserApp = {
event.initEvent("UIReady", true, false);
window.dispatchEvent(event);
if (this._startupStatus)
if (this._startupStatus) {
this.onAppUpdated();
}
if (!ParentalControls.isAllowed(ParentalControls.INSTALL_EXTENSION)) {
// Disable extension installs
@ -1103,7 +1097,8 @@ var BrowserApp = {
},
_loadWebapp: function(aMessage) {
// Entry point for WebApps. This is the point in which we know
// the code is being used as a WebApp runtime.
this._initRuntime(this._startupStatus, aMessage.url, aUrl => {
this.manifestUrl = aMessage.url;
this.addTab(aUrl, { title: aMessage.name });