Bug 1146589 - Ensure that tab opened with "open now" action is selected and visible when fennec loads (r=mcomella)

This commit is contained in:
Martyn Haigh
2015-03-30 10:45:03 +01:00
parent 33b75b9d68
commit cb59cf39df
4 changed files with 44 additions and 7 deletions

View File

@@ -111,7 +111,7 @@ public class TabQueueHelper {
return prefs.getInt(PREF_TAB_QUEUE_COUNT, 0);
}
public static void openQueuedUrls(final Context context, final GeckoProfile profile, final String filename) {
public static void openQueuedUrls(final Context context, final GeckoProfile profile, final String filename, boolean shouldPerformJavaScriptCallback) {
ThreadUtils.assertNotOnUiThread();
// Remove the notification.
@@ -129,6 +129,7 @@ public class TabQueueHelper {
JSONObject data = new JSONObject();
try {
data.put("urls", jsonArray);
data.put("shouldNotifyTabsOpenedToJava", shouldPerformJavaScriptCallback);
GeckoAppShell.sendEventToGecko(GeckoEvent.createBroadcastEvent("Tabs:OpenMultiple", data.toString()));
} catch (JSONException e) {
// Don't exit early as we perform cleanup at the end of this function.