From cc8a7e3f7b7d40967d2dd537b6343c87ba9138c7 Mon Sep 17 00:00:00 2001 From: Moonchild Date: Thu, 11 Mar 2021 06:43:10 +0000 Subject: Issue #1053 - Remove MOZ_WIDGET_ANDROID and IDB_MOBILE --- dom/workers/ServiceWorkerClients.cpp | 48 ------------------------------------ 1 file changed, 48 deletions(-) (limited to 'dom/workers') diff --git a/dom/workers/ServiceWorkerClients.cpp b/dom/workers/ServiceWorkerClients.cpp index f7f35919cd..78a4825654 100644 --- a/dom/workers/ServiceWorkerClients.cpp +++ b/dom/workers/ServiceWorkerClients.cpp @@ -32,10 +32,6 @@ #include "nsWindowWatcher.h" #include "nsWeakReference.h" -#ifdef MOZ_WIDGET_ANDROID -#include "AndroidBridge.h" -#endif - using namespace mozilla; using namespace mozilla::dom; using namespace mozilla::dom::workers; @@ -512,12 +508,6 @@ public: return NS_OK; } -#ifdef MOZ_WIDGET_ANDROID - // This fires an intent that will start launching Fennec and foreground it, - // if necessary. - java::GeckoAppShell::OpenWindowForNotification(); -#endif - nsCOMPtr window; nsresult rv = OpenWindow(getter_AddRefs(window)); if (NS_SUCCEEDED(rv)) { @@ -573,44 +563,6 @@ public: MOZ_ASSERT(NS_SUCCEEDED(rv)); return NS_OK; } -#ifdef MOZ_WIDGET_ANDROID - else if (rv == NS_ERROR_NOT_AVAILABLE) { - // We couldn't get a browser window, so Fennec must not be running. - // Send an Intent to launch Fennec and wait for "BrowserChrome:Ready" - // to try opening a window again. - nsCOMPtr os = services::GetObserverService(); - NS_ENSURE_STATE(os); - - WorkerPrivate* workerPrivate = mPromiseProxy->GetWorkerPrivate(); - MOZ_ASSERT(workerPrivate); - - RefPtr swm = ServiceWorkerManager::GetInstance(); - if (!swm) { - // browser shutdown - return NS_ERROR_FAILURE; - } - - nsCOMPtr principal = workerPrivate->GetPrincipal(); - MOZ_ASSERT(principal); - - RefPtr registration = - swm->GetRegistration(principal, NS_ConvertUTF16toUTF8(mScope)); - if (NS_WARN_IF(!registration)) { - return NS_ERROR_FAILURE; - } - - RefPtr serviceWorkerInfo = - registration->GetServiceWorkerInfoById(workerPrivate->ServiceWorkerID()); - if (NS_WARN_IF(!serviceWorkerInfo)) { - return NS_ERROR_FAILURE; - } - - os->AddObserver(static_cast(serviceWorkerInfo->WorkerPrivate()), - "BrowserChrome:Ready", true); - serviceWorkerInfo->WorkerPrivate()->AddPendingWindow(this); - return NS_OK; - } -#endif RefPtr resolveRunnable = new ResolveOpenWindowRunnable(mPromiseProxy, nullptr, rv); -- cgit v1.2.3