mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 695165 - Implement plumbing for Forward [r=mfinkle]
Put in support for the "Forward" feature; it can be invoked by calling doForward() on a Tab. Not yet hooked up to any UI elements, pending UX decisions.
This commit is contained in:
parent
c098c1f428
commit
e707191418
@ -183,6 +183,15 @@ public class Tab {
|
||||
return true;
|
||||
}
|
||||
|
||||
public boolean doForward() {
|
||||
if (mHistoryIndex + 1 >= mHistory.size()) {
|
||||
return false;
|
||||
}
|
||||
GeckoEvent e = new GeckoEvent("session-forward", "");
|
||||
GeckoAppShell.sendEventToGecko(e);
|
||||
return true;
|
||||
}
|
||||
|
||||
void handleSessionHistoryMessage(String event, JSONObject message) throws JSONException {
|
||||
if (event.equals("New")) {
|
||||
String uri = message.getString("uri");
|
||||
|
@ -133,6 +133,7 @@ var BrowserApp = {
|
||||
Services.obs.addObserver(this, "Tab:Select", false);
|
||||
Services.obs.addObserver(this, "Tab:Close", false);
|
||||
Services.obs.addObserver(this, "session-back", false);
|
||||
Services.obs.addObserver(this, "session-forward", false);
|
||||
Services.obs.addObserver(this, "session-reload", false);
|
||||
Services.obs.addObserver(this, "SaveAs:PDF", false);
|
||||
Services.obs.addObserver(this, "Preferences:Get", false);
|
||||
@ -461,6 +462,8 @@ var BrowserApp = {
|
||||
|
||||
if (aTopic == "session-back") {
|
||||
browser.goBack();
|
||||
} else if (aTopic == "session-forward") {
|
||||
browser.goForward();
|
||||
} else if (aTopic == "session-reload") {
|
||||
browser.reload();
|
||||
} else if (aTopic == "Tab:Add") {
|
||||
|
Loading…
Reference in New Issue
Block a user