mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-06 15:58:39 +09:00
Issue #2653 - Part 1: Initial cleanup of AppId and isolated mozbrowser.
This removes a lot of the plumbing for having the platform embed itself through IPC which was required for B2G running the browser as both shell and browser application.
This commit is contained in:
parent
a6c54d0736
commit
7b6e3a2d4a
77 changed files with 295 additions and 1799 deletions
|
|
@ -73,25 +73,13 @@ TCPSocketParentBase::~TCPSocketParentBase()
|
|||
uint32_t
|
||||
TCPSocketParent::GetAppId()
|
||||
{
|
||||
const PContentParent *content = Manager()->Manager();
|
||||
if (PBrowserParent* browser = SingleManagedOrNull(content->ManagedPBrowserParent())) {
|
||||
TabParent *tab = TabParent::GetFrom(browser);
|
||||
return tab->OwnAppId();
|
||||
} else {
|
||||
return nsIScriptSecurityManager::UNKNOWN_APP_ID;
|
||||
}
|
||||
};
|
||||
return nsIScriptSecurityManager::UNKNOWN_APP_ID;
|
||||
}
|
||||
|
||||
bool
|
||||
TCPSocketParent::GetInIsolatedMozBrowser()
|
||||
{
|
||||
const PContentParent *content = Manager()->Manager();
|
||||
if (PBrowserParent* browser = SingleManagedOrNull(content->ManagedPBrowserParent())) {
|
||||
TabParent *tab = TabParent::GetFrom(browser);
|
||||
return tab->IsIsolatedMozBrowserElement();
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -225,20 +213,11 @@ TCPSocketParent::RecvOpenBind(const nsCString& aRemoteHost,
|
|||
}
|
||||
}
|
||||
|
||||
// Obtain App ID
|
||||
uint32_t appId = nsIScriptSecurityManager::NO_APP_ID;
|
||||
bool inIsolatedMozBrowser = false;
|
||||
const PContentParent *content = Manager()->Manager();
|
||||
if (PBrowserParent* browser = SingleManagedOrNull(content->ManagedPBrowserParent())) {
|
||||
// appId's are for B2G only currently, where managees.Count() == 1
|
||||
// This is not guaranteed currently in Desktop, so skip this there.
|
||||
TabParent *tab = TabParent::GetFrom(browser);
|
||||
appId = tab->OwnAppId();
|
||||
inIsolatedMozBrowser = tab->IsIsolatedMozBrowserElement();
|
||||
}
|
||||
|
||||
mSocket = new TCPSocket(nullptr, NS_ConvertUTF8toUTF16(aRemoteHost), aRemotePort, aUseSSL, aUseArrayBuffers);
|
||||
mSocket->SetAppIdAndBrowser(appId, inIsolatedMozBrowser);
|
||||
mSocket->SetAppIdAndBrowser(nsIScriptSecurityManager::NO_APP_ID, inIsolatedMozBrowser);
|
||||
mSocket->SetSocketBridgeParent(this);
|
||||
rv = mSocket->InitWithUnconnectedTransport(socketTransport);
|
||||
NS_ENSURE_SUCCESS(rv, true);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue