From a50bed555a7f5c2f43c7f31ba4c6a7f936d6f168 Mon Sep 17 00:00:00 2001 From: Blake Kaplan Date: Thu, 12 Feb 2015 15:41:21 -0800 Subject: [PATCH] Bug 1117337 - Make icon URIs constructable via XPCOM. r=seth --HG-- rename : image/decoders/icon/nsIIconURI.idl => image/public/nsIIconURI.idl --- b2g/installer/package-manifest.in | 1 - browser/installer/package-manifest.in | 1 - image/decoders/icon/moz.build | 6 ------ image/decoders/icon/nsIconModule.cpp | 3 +++ image/decoders/icon/nsIconURI.h | 8 -------- image/public/moz.build | 1 + image/{decoders/icon => public}/nsIIconURI.idl | 13 +++++++++++++ mobile/android/installer/package-manifest.in | 1 - 8 files changed, 17 insertions(+), 17 deletions(-) rename image/{decoders/icon => public}/nsIIconURI.idl (86%) diff --git a/b2g/installer/package-manifest.in b/b2g/installer/package-manifest.in index a9c609fb3eb6..4ce2304741ea 100644 --- a/b2g/installer/package-manifest.in +++ b/b2g/installer/package-manifest.in @@ -237,7 +237,6 @@ @BINPATH@/components/htmlparser.xpt @BINPATH@/components/identity.xpt @BINPATH@/components/imglib2.xpt -@BINPATH@/components/imgicon.xpt @BINPATH@/components/inspector.xpt @BINPATH@/components/intl.xpt @BINPATH@/components/jar.xpt diff --git a/browser/installer/package-manifest.in b/browser/installer/package-manifest.in index c976bb96d5fa..6b15f029fb21 100644 --- a/browser/installer/package-manifest.in +++ b/browser/installer/package-manifest.in @@ -263,7 +263,6 @@ @RESPATH@/components/htmlparser.xpt @RESPATH@/components/identity.xpt @RESPATH@/components/imglib2.xpt -@RESPATH@/components/imgicon.xpt @RESPATH@/components/inspector.xpt @RESPATH@/components/intl.xpt @RESPATH@/components/jar.xpt diff --git a/image/decoders/icon/moz.build b/image/decoders/icon/moz.build index 9ff31faaaac9..f4a323c4c32b 100644 --- a/image/decoders/icon/moz.build +++ b/image/decoders/icon/moz.build @@ -4,12 +4,6 @@ # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. -XPIDL_SOURCES += [ - 'nsIIconURI.idl', -] - -XPIDL_MODULE = 'imgicon' - UNIFIED_SOURCES += [ 'nsIconModule.cpp', 'nsIconProtocolHandler.cpp', diff --git a/image/decoders/icon/nsIconModule.cpp b/image/decoders/icon/nsIconModule.cpp index 7b1886df6741..36225374df94 100644 --- a/image/decoders/icon/nsIconModule.cpp +++ b/image/decoders/icon/nsIconModule.cpp @@ -19,11 +19,14 @@ { 0x99, 0x5, 0x0, 0x10, 0x83, 0x1, 0xe, 0x9b } } NS_GENERIC_FACTORY_CONSTRUCTOR(nsIconProtocolHandler) +NS_GENERIC_FACTORY_CONSTRUCTOR(nsMozIconURI) NS_DEFINE_NAMED_CID(NS_ICONPROTOCOL_CID); +NS_DEFINE_NAMED_CID(NS_MOZICONURI_CID); static const mozilla::Module::CIDEntry kIconCIDs[] = { { &kNS_ICONPROTOCOL_CID, false, nullptr, nsIconProtocolHandlerConstructor }, + { &kNS_MOZICONURI_CID, false, nullptr, nsMozIconURIConstructor }, { nullptr } }; diff --git a/image/decoders/icon/nsIconURI.h b/image/decoders/icon/nsIconURI.h index 5bbaa79b68f3..7590c669571b 100644 --- a/image/decoders/icon/nsIconURI.h +++ b/image/decoders/icon/nsIconURI.h @@ -11,14 +11,6 @@ #include "nsCOMPtr.h" #include "nsString.h" -#define NS_MOZICONURI_CID \ -{ \ - 0x43a88e0e, \ - 0x2d37, \ - 0x11d5, \ - { 0x99, 0x7, 0x0, 0x10, 0x83, 0x1, 0xe, 0x9b } \ -} - class nsMozIconURI MOZ_FINAL : public nsIMozIconURI { public: diff --git a/image/public/moz.build b/image/public/moz.build index b7de6c4e7496..4f663db925ec 100644 --- a/image/public/moz.build +++ b/image/public/moz.build @@ -15,6 +15,7 @@ XPIDL_SOURCES += [ 'imgIRequest.idl', 'imgIScriptedNotificationObserver.idl', 'imgITools.idl', + 'nsIIconURI.idl', ] XPIDL_MODULE = 'imglib2' diff --git a/image/decoders/icon/nsIIconURI.idl b/image/public/nsIIconURI.idl similarity index 86% rename from image/decoders/icon/nsIIconURI.idl rename to image/public/nsIIconURI.idl index a1f451a7d496..5ef4c156372d 100644 --- a/image/decoders/icon/nsIIconURI.idl +++ b/image/public/nsIIconURI.idl @@ -69,3 +69,16 @@ interface nsIMozIconURI : nsIURI /// fileExtension: The file extension of the file which we are looking up. readonly attribute ACString fileExtension; }; + +%{C++ + +// CID for nsMozIconURI, if implemented on this platform. +#define NS_MOZICONURI_CID \ +{ \ + 0x43a88e0e, \ + 0x2d37, \ + 0x11d5, \ + { 0x99, 0x7, 0x0, 0x10, 0x83, 0x1, 0xe, 0x9b } \ +} + +%} diff --git a/mobile/android/installer/package-manifest.in b/mobile/android/installer/package-manifest.in index 57b2804370e8..c406e7594cbe 100644 --- a/mobile/android/installer/package-manifest.in +++ b/mobile/android/installer/package-manifest.in @@ -191,7 +191,6 @@ @BINPATH@/components/html5.xpt @BINPATH@/components/htmlparser.xpt @BINPATH@/components/imglib2.xpt -@BINPATH@/components/imgicon.xpt @BINPATH@/components/inspector.xpt @BINPATH@/components/intl.xpt @BINPATH@/components/jar.xpt