mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-27 02:47:31 +09:00
Merge remote-tracking branch 'origin/tracking' into custom
This commit is contained in:
commit
310c05b97a
177 changed files with 514 additions and 4888 deletions
|
|
@ -1893,29 +1893,15 @@ MediaManager::NotifyRecordingStatusChange(nsPIDOMWindowInner* aWindow,
|
|||
props->SetPropertyAsBool(NS_LITERAL_STRING("isAudio"), aIsAudio);
|
||||
props->SetPropertyAsBool(NS_LITERAL_STRING("isVideo"), aIsVideo);
|
||||
|
||||
bool isApp = false;
|
||||
nsString requestURL;
|
||||
nsCString pageURL;
|
||||
nsCOMPtr<nsIURI> docURI = aWindow->GetDocumentURI();
|
||||
NS_ENSURE_TRUE(docURI, NS_ERROR_FAILURE);
|
||||
|
||||
if (nsCOMPtr<nsIDocShell> docShell = aWindow->GetDocShell()) {
|
||||
isApp = docShell->GetIsApp();
|
||||
if (isApp) {
|
||||
nsresult rv = docShell->GetAppManifestURL(requestURL);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
}
|
||||
}
|
||||
nsresult rv = docURI->GetSpec(pageURL);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
if (!isApp) {
|
||||
nsCString pageURL;
|
||||
nsCOMPtr<nsIURI> docURI = aWindow->GetDocumentURI();
|
||||
NS_ENSURE_TRUE(docURI, NS_ERROR_FAILURE);
|
||||
NS_ConvertUTF8toUTF16 requestURL(pageURL);
|
||||
|
||||
nsresult rv = docURI->GetSpec(pageURL);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
requestURL = NS_ConvertUTF8toUTF16(pageURL);
|
||||
}
|
||||
|
||||
props->SetPropertyAsBool(NS_LITERAL_STRING("isApp"), isApp);
|
||||
props->SetPropertyAsAString(NS_LITERAL_STRING("requestURL"), requestURL);
|
||||
|
||||
obs->NotifyObservers(static_cast<nsIPropertyBag2*>(props),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue