mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-28 23:31:56 +00:00
Bug 1825325 - Make uriloader/exthandler buildable outside of a unified build environment r=andi
Depends on D173969 Differential Revision: https://phabricator.services.mozilla.com/D173970
This commit is contained in:
parent
d90fc7ba40
commit
34135d3d87
@ -9,8 +9,14 @@
|
||||
#include "HandlerServiceParent.h"
|
||||
#include "nsIHandlerService.h"
|
||||
#include "nsIMIMEInfo.h"
|
||||
#include "nsIMIMEService.h"
|
||||
#include "ContentHandlerService.h"
|
||||
#include "nsIExternalProtocolService.h"
|
||||
#include "nsStringEnumerator.h"
|
||||
#include "nsIMutableArray.h"
|
||||
#include "nsCExternalHandlerService.h"
|
||||
#include "nsComponentManagerUtils.h"
|
||||
#include "nsServiceManagerUtils.h"
|
||||
#ifdef MOZ_WIDGET_GTK
|
||||
# include "unix/nsGNOMERegistry.h"
|
||||
#endif
|
||||
|
@ -142,5 +142,3 @@ if CONFIG["MOZ_ENABLE_DBUS"]:
|
||||
if CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk":
|
||||
CXXFLAGS += CONFIG["MOZ_GTK3_CFLAGS"]
|
||||
CXXFLAGS += CONFIG["MOZ_DBUS_GLIB_CFLAGS"]
|
||||
|
||||
REQUIRES_UNIFIED_BUILD = True
|
||||
|
@ -16,6 +16,7 @@
|
||||
#include "nsServiceManagerUtils.h"
|
||||
#include "nsIInterfaceRequestor.h"
|
||||
#include "nsIInterfaceRequestorUtils.h"
|
||||
#include "nsIRedirectHistoryEntry.h"
|
||||
#include "nsNetUtil.h"
|
||||
#include "nsContentSecurityManager.h"
|
||||
#include "nsExternalHelperAppService.h"
|
||||
|
@ -7,6 +7,7 @@
|
||||
#include "nsLocalHandlerApp.h"
|
||||
#include "nsIURI.h"
|
||||
#include "nsIProcess.h"
|
||||
#include "nsComponentManagerUtils.h"
|
||||
|
||||
// XXX why does nsMIMEInfoImpl have a threadsafe nsISupports? do we need one
|
||||
// here too?
|
||||
|
@ -11,15 +11,20 @@
|
||||
#include "nsIFile.h"
|
||||
#include "nsIFileURL.h"
|
||||
#include "nsEscape.h"
|
||||
#include "nsComponentManagerUtils.h"
|
||||
#include "nsCURILoader.h"
|
||||
#include "nsCExternalHandlerService.h"
|
||||
#include "nsIExternalProtocolService.h"
|
||||
#include "nsIObserverService.h"
|
||||
#include "nsISupportsPrimitives.h"
|
||||
#include "mozilla/ClearOnShutdown.h"
|
||||
#include "mozilla/Services.h"
|
||||
#include "mozilla/StaticPtr.h"
|
||||
#include "mozilla/StaticPrefs_browser.h"
|
||||
#include "xpcpublic.h"
|
||||
|
||||
static bool sInitializedOurData = false;
|
||||
StaticRefPtr<nsIFile> sOurAppFile;
|
||||
mozilla::StaticRefPtr<nsIFile> sOurAppFile;
|
||||
|
||||
/* static */
|
||||
already_AddRefed<nsIFile> nsMIMEInfoBase::GetCanonicalExecutable(
|
||||
@ -80,14 +85,14 @@ nsMIMEInfoBase::nsMIMEInfoBase(const char* aMIMEType)
|
||||
: mSchemeOrType(aMIMEType),
|
||||
mClass(eMIMEInfo),
|
||||
mAlwaysAskBeforeHandling(
|
||||
StaticPrefs::
|
||||
mozilla::StaticPrefs::
|
||||
browser_download_always_ask_before_handling_new_types()) {}
|
||||
|
||||
nsMIMEInfoBase::nsMIMEInfoBase(const nsACString& aMIMEType)
|
||||
: mSchemeOrType(aMIMEType),
|
||||
mClass(eMIMEInfo),
|
||||
mAlwaysAskBeforeHandling(
|
||||
StaticPrefs::
|
||||
mozilla::StaticPrefs::
|
||||
browser_download_always_ask_before_handling_new_types()) {}
|
||||
|
||||
// Constructor for a handler that lets the caller specify whether this is a
|
||||
@ -99,7 +104,7 @@ nsMIMEInfoBase::nsMIMEInfoBase(const nsACString& aType, HandlerClass aClass)
|
||||
: mSchemeOrType(aType),
|
||||
mClass(aClass),
|
||||
mAlwaysAskBeforeHandling(
|
||||
StaticPrefs::
|
||||
mozilla::StaticPrefs::
|
||||
browser_download_always_ask_before_handling_new_types() ||
|
||||
aClass != eMIMEInfo) {}
|
||||
|
||||
@ -352,7 +357,8 @@ bool nsMIMEInfoBase::AutomationOnlyCheckIfLaunchStubbed(nsIFile* aFile) {
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsMIMEInfoBase::LaunchWithURI(nsIURI* aURI, BrowsingContext* aBrowsingContext) {
|
||||
nsMIMEInfoBase::LaunchWithURI(nsIURI* aURI,
|
||||
mozilla::dom::BrowsingContext* aBrowsingContext) {
|
||||
// This is only being called with protocol handlers
|
||||
NS_ASSERTION(mClass == eProtocolInfo,
|
||||
"nsMIMEInfoBase should be a protocol handler");
|
||||
|
@ -5,9 +5,11 @@
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include "nsArrayEnumerator.h"
|
||||
#include "nsComponentManagerUtils.h"
|
||||
#include "nsCOMArray.h"
|
||||
#include "nsLocalFile.h"
|
||||
#include "nsMIMEInfoWin.h"
|
||||
#include "nsIMIMEService.h"
|
||||
#include "nsNetUtil.h"
|
||||
#include <windows.h>
|
||||
#include <shellapi.h>
|
||||
@ -98,7 +100,8 @@ nsMIMEInfoWin::LaunchWithFile(nsIFile* aFile) {
|
||||
|
||||
if (mPreferredAction == useSystemDefault) {
|
||||
nsCOMPtr<nsIFile> defaultApp = GetDefaultApplication();
|
||||
if (defaultApp && StaticPrefs::browser_pdf_launchDefaultEdgeAsApp()) {
|
||||
if (defaultApp &&
|
||||
mozilla::StaticPrefs::browser_pdf_launchDefaultEdgeAsApp()) {
|
||||
// Since Edgium is the default handler for PDF and other kinds of files,
|
||||
// if we're using the OS default and it's Edgium prefer its app mode so it
|
||||
// operates as a viewer (without browser toolbars). Bug 1632277.
|
||||
@ -295,7 +298,8 @@ nsresult nsMIMEInfoWin::LoadUriInternal(nsIURI* aURL) {
|
||||
// Ask the shell/urlmon to parse |utf16Spec| to avoid malformed URLs.
|
||||
// Failure is indicative of a potential security issue so we should
|
||||
// bail out if so.
|
||||
LauncherResult<_bstr_t> validatedUri = UrlmonValidateUri(utf16Spec.get());
|
||||
mozilla::LauncherResult<_bstr_t> validatedUri =
|
||||
mozilla::UrlmonValidateUri(utf16Spec.get());
|
||||
if (validatedUri.isErr()) {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user