mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 752001 - Remove unnecessary indirection for stop/reload/forward actions. r=mfinkle
This commit is contained in:
parent
5469fb621c
commit
bdea1a3ca6
@ -190,7 +190,9 @@ public class BrowserToolbar {
|
||||
mStop = (ImageButton) mLayout.findViewById(R.id.stop);
|
||||
mStop.setOnClickListener(new Button.OnClickListener() {
|
||||
public void onClick(View v) {
|
||||
doStop();
|
||||
Tab tab = Tabs.getInstance().getSelectedTab();
|
||||
if (tab != null)
|
||||
tab.doStop();
|
||||
}
|
||||
});
|
||||
|
||||
@ -221,10 +223,6 @@ public class BrowserToolbar {
|
||||
GeckoApp.mAppContext.showTabs();
|
||||
}
|
||||
|
||||
private void doStop() {
|
||||
GeckoApp.mAppContext.doStop();
|
||||
}
|
||||
|
||||
public int getHighlightColor() {
|
||||
return mColor;
|
||||
}
|
||||
|
@ -509,10 +509,14 @@ abstract public class GeckoApp
|
||||
}
|
||||
return true;
|
||||
case R.id.reload:
|
||||
doReload();
|
||||
tab = Tabs.getInstance().getSelectedTab();
|
||||
if (tab != null)
|
||||
tab.doReload();
|
||||
return true;
|
||||
case R.id.forward:
|
||||
doForward();
|
||||
tab = Tabs.getInstance().getSelectedTab();
|
||||
if (tab != null)
|
||||
tab.doForward();
|
||||
return true;
|
||||
case R.id.save_as_pdf:
|
||||
GeckoAppShell.sendEventToGecko(GeckoEvent.createBroadcastEvent("SaveAs:PDF", null));
|
||||
@ -2533,33 +2537,6 @@ abstract public class GeckoApp
|
||||
return true;
|
||||
}
|
||||
|
||||
public boolean doReload() {
|
||||
Log.i(LOGTAG, "Reload requested");
|
||||
Tab tab = Tabs.getInstance().getSelectedTab();
|
||||
if (tab == null)
|
||||
return false;
|
||||
|
||||
return tab.doReload();
|
||||
}
|
||||
|
||||
public boolean doForward() {
|
||||
Log.i(LOGTAG, "Forward requested");
|
||||
Tab tab = Tabs.getInstance().getSelectedTab();
|
||||
if (tab == null)
|
||||
return false;
|
||||
|
||||
return tab.doForward();
|
||||
}
|
||||
|
||||
public boolean doStop() {
|
||||
Log.i(LOGTAG, "Stop requested");
|
||||
Tab tab = Tabs.getInstance().getSelectedTab();
|
||||
if (tab == null)
|
||||
return false;
|
||||
|
||||
return tab.doStop();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBackPressed() {
|
||||
if (mDoorHangerPopup.isShowing()) {
|
||||
|
Loading…
Reference in New Issue
Block a user