Skip to content

Commit

Permalink
Bug 919296 - Minimize the #includes in netwerk/ IDL files; r=mcmanus
Browse files Browse the repository at this point in the history
  • Loading branch information
ehsan committed Sep 23, 2013
1 parent b5eae7f commit fa89d8c
Show file tree
Hide file tree
Showing 40 changed files with 66 additions and 41 deletions.
1 change: 1 addition & 0 deletions browser/components/feeds/src/nsFeedSniffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
#include "nsIMIMEHeaderParam.h"

#include "nsMimeTypes.h"
#include "nsIURI.h"
#include <algorithm>

#define TYPE_ATOM "application/atom+xml"
Expand Down
1 change: 1 addition & 0 deletions content/base/src/nsContentAreaDragDrop.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
#include "imgIContainer.h"
#include "imgIRequest.h"
#include "nsDOMDataTransfer.h"
#include "nsIMIMEInfo.h"
#include "mozilla/dom/Element.h"
#include "mozilla/dom/HTMLAreaElement.h"

Expand Down
1 change: 1 addition & 0 deletions content/html/content/src/HTMLInputElement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@
#include "nsIStringEnumerator.h"
#include "HTMLSplitOnSpacesTokenizer.h"
#include "nsIController.h"
#include "nsIMIMEInfo.h"

// input type=date
#include "js/Date.h"
Expand Down
1 change: 1 addition & 0 deletions dom/base/nsMimeTypeArray.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#include "nsIMIMEService.h"
#include "nsIMIMEInfo.h"
#include "Navigator.h"
#include "nsServiceManagerUtils.h"

using namespace mozilla;
using namespace mozilla::dom;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@
#include "nsWebBrowserPersist.h"

#include "nsIContent.h"
#include "nsIMIMEInfo.h"
#include "mozilla/dom/HTMLInputElement.h"
#include "mozilla/dom/HTMLSharedElement.h"
#include "mozilla/dom/HTMLSharedObjectElement.h"
Expand Down
1 change: 0 additions & 1 deletion netwerk/base/public/nsIApplicationCacheChannel.idl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +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/. */

#include "nsISupports.idl"
#include "nsIApplicationCacheContainer.idl"

/**
Expand Down
1 change: 0 additions & 1 deletion netwerk/base/public/nsIDashboard.idl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */

#include "nsISupports.idl"
#include "nsIDashboardEventNotifier.idl"

/* A JavaScript callback function that takes a JSON as its parameter.
* The returned JSON contains arrays with data
Expand Down
3 changes: 2 additions & 1 deletion netwerk/base/public/nsIInputStreamChannel.idl
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@
* 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/. */

#include "nsIChannel.idl"
#include "nsISupports.idl"

interface nsIInputStream;
interface nsIURI;

/**
* nsIInputStreamChannel
Expand Down
4 changes: 3 additions & 1 deletion netwerk/base/public/nsILoadGroupChild.idl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
* 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/. */

#include "nsILoadGroup.idl"
#include "nsISupports.idl"

interface nsILoadGroup;

/**
* nsILoadGroupChild provides a hierarchy of load groups so that the
Expand Down
2 changes: 1 addition & 1 deletion netwerk/base/public/nsIPermissionManager.idl
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@
*/

#include "nsISupports.idl"
#include "nsISimpleEnumerator.idl"

interface nsIURI;
interface nsIObserver;
interface nsIPrincipal;
interface nsIDOMWindow;
interface nsIPermission;
interface nsISimpleEnumerator;

[scriptable, uuid(c9fec678-f194-43c9-96b0-7bd9dbdd6bb0)]
interface nsIPermissionManager : nsISupports
Expand Down
2 changes: 1 addition & 1 deletion netwerk/base/public/nsIServerSocket.idl
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */

#include "nsISupports.idl"
#include "nsIFile.idl"

interface nsIFile;
interface nsIServerSocketListener;
interface nsISocketTransport;

Expand Down
8 changes: 6 additions & 2 deletions netwerk/base/public/nsISocketTransport.idl
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,16 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */

#include "nsITransport.idl"
#include "nsINetAddr.idl"

interface nsIInterfaceRequestor;
interface nsINetAddr;

%{ C++
#include "mozilla/net/DNS.h"
namespace mozilla {
namespace net {
union NetAddr;
}
}
%}
native NetAddr(mozilla::net::NetAddr);

Expand Down
2 changes: 1 addition & 1 deletion netwerk/base/public/nsISocketTransportService.idl
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */

#include "nsISupports.idl"
#include "nsIFile.idl"

interface nsIFile;
interface nsISocketTransport;
interface nsIProxyInfo;
interface nsIRunnable;
Expand Down
1 change: 0 additions & 1 deletion netwerk/base/public/nsISystemProxySettings.idl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */

#include "nsISupports.idl"
#include "nsIURI.idl"

/**
* This interface allows the proxy code to use platform-specific proxy
Expand Down
3 changes: 2 additions & 1 deletion netwerk/base/public/nsIThreadRetargetableRequest.idl
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */

#include "nsISupports.idl"
#include "nsIEventTarget.idl"

interface nsIEventTarget;

/**
* nsIThreadRetargetableRequest
Expand Down
8 changes: 6 additions & 2 deletions netwerk/base/public/nsIUDPServerSocket.idl
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,19 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */

#include "nsISupports.idl"
#include "nsINetAddr.idl"

interface nsINetAddr;
interface nsIUDPServerSocketListener;
interface nsIUDPMessage;
interface nsISocketTransport;
interface nsIOutputStream;

%{ C++
#include "mozilla/net/DNS.h"
namespace mozilla {
namespace net {
union NetAddr;
}
}
%}
native NetAddr(mozilla::net::NetAddr);
[ptr] native NetAddrPtr(mozilla::net::NetAddr);
Expand Down
1 change: 1 addition & 0 deletions netwerk/base/src/Dashboard.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#include "mozilla/Mutex.h"
#include "mozilla/net/DashboardTypes.h"
#include "nsIDashboard.h"
#include "nsIDashboardEventNotifier.h"
#include "nsIDNSListener.h"
#include "nsIServiceManager.h"
#include "nsITimer.h"
Expand Down
2 changes: 2 additions & 0 deletions netwerk/base/src/nsServerSocket.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
#include "nsThreadUtils.h"
#include "mozilla/Attributes.h"
#include "mozilla/net/DNS.h"
#include "nsServiceManagerUtils.h"
#include "nsIFile.h"

using namespace mozilla;
using namespace mozilla::net;
Expand Down
1 change: 1 addition & 0 deletions netwerk/base/src/nsSocketTransportService2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include "mozilla/Likely.h"
#include "mozilla/PublicSSL.h"
#include "nsThreadUtils.h"
#include "nsIFile.h"

using namespace mozilla;
using namespace mozilla::net;
Expand Down
1 change: 1 addition & 0 deletions netwerk/base/src/nsSocketTransportService2.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#include "mozilla/net/DashboardTypes.h"

class nsASocketHandler;
struct PRPollDesc;

//-----------------------------------------------------------------------------

Expand Down
3 changes: 0 additions & 3 deletions netwerk/cache/nsICache.idl
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,3 @@ interface nsICache
const unsigned long NO_EXPIRATION_TIME = 0xFFFFFFFF;
};

%{C++
#include "nsError.h"
%}
2 changes: 1 addition & 1 deletion netwerk/cookie/nsICookieManager.idl
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */

#include "nsISupports.idl"
#include "nsISimpleEnumerator.idl"

interface nsISimpleEnumerator;

/**
* An optional interface for accessing or removing the cookies
Expand Down
6 changes: 5 additions & 1 deletion netwerk/dns/nsIDNSRecord.idl
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@
#include "nsISupports.idl"

%{ C++
#include "mozilla/net/DNS.h"
namespace mozilla {
namespace net {
union NetAddr;
}
}
%}
native NetAddr(mozilla::net::NetAddr);
interface nsINetAddr;
Expand Down
3 changes: 1 addition & 2 deletions netwerk/dns/nsIDNSService.idl
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ interface nsIDNSRecord;
interface nsIDNSListener;

%{C++
#include "nsTArray.h"

template<class T> class nsTArray;
namespace mozilla { namespace net {
struct DNSCacheEntries;
} }
Expand Down
7 changes: 4 additions & 3 deletions netwerk/mime/nsIMIMEService.idl
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */

#include "nsISupports.idl"
#include "nsIMIMEInfo.idl"
#include "nsIURI.idl"
#include "nsIFile.idl"

interface nsIFile;
interface nsIMIMEInfo;
interface nsIURI;

%{C++
#define NS_MIMESERVICE_CID \
Expand Down
2 changes: 1 addition & 1 deletion netwerk/protocol/file/nsIFileChannel.idl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* 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/. */

#include "nsIChannel.idl"
#include "nsISupports.idl"

interface nsIFile;

Expand Down
2 changes: 1 addition & 1 deletion netwerk/protocol/http/nsIHttpAuthenticableChannel.idl
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */

#include "nsIProxiedChannel.idl"
#include "nsIChannel.idl"

interface nsILoadGroup;
interface nsIURI;
interface nsIInterfaceRequestor;
typedef unsigned long nsLoadFlags;

[scriptable, uuid(701093ac-5c7f-429c-99e3-423b041fccb4)]
interface nsIHttpAuthenticableChannel : nsIProxiedChannel
Expand Down
5 changes: 2 additions & 3 deletions netwerk/protocol/http/nsIHttpChannelInternal.idl
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,8 @@
#include "nsISupports.idl"

%{C++
#include "nsTArray.h"
#include "nsCOMArray.h"

template<class T> class nsTArray;
template<class T> class nsCOMArray;
class nsCString;
%}
[ptr] native StringArray(nsTArray<nsCString>);
Expand Down
6 changes: 5 additions & 1 deletion netwerk/socket/nsISOCKSSocketInfo.idl
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@
#include "nsISupports.idl"

%{ C++
#include "mozilla/net/DNS.h"
namespace mozilla {
namespace net {
union NetAddr;
}
}
%}
[ptr] native NetAddrPtr(mozilla::net::NetAddr);

Expand Down
2 changes: 1 addition & 1 deletion netwerk/socket/nsISSLSocketControl.idl
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
interface nsIInterfaceRequestor;

%{C++
#include "nsTArray.h"
template<class T> class nsTArray;
class nsCString;
%}
[ref] native nsCStringTArrayRef(nsTArray<nsCString>);
Expand Down
1 change: 1 addition & 0 deletions netwerk/streamconv/converters/nsFTPDirListingConv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#include "nsCRT.h"
#include "nsAutoPtr.h"
#include "nsIChannel.h"
#include "nsIURI.h"

#include "ParseFTPList.h"
#include <algorithm>
Expand Down
1 change: 0 additions & 1 deletion netwerk/streamconv/public/mozITXTToHTMLConv.idl
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
*/

#include "nsIStreamConverter.idl"
#include "nsrootidl.idl"

%{C++
// {77c0e42a-1dd2-11b2-8ebf-edc6606f2f4b}
Expand Down
2 changes: 1 addition & 1 deletion netwerk/streamconv/public/nsIAppleFileDecoder.idl
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */

#include "nsIOutputStream.idl"
#include "nsIFile.idl"

interface nsIFile;

%{C++
#define NS_APPLEFILEDECODER_CID \
Expand Down
4 changes: 2 additions & 2 deletions netwerk/streamconv/public/nsIStreamConverter.idl
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */

#include "nsIStreamListener.idl"
#include "nsIInputStream.idl"
#include "nsIURI.idl"

interface nsIInputStream;

/**
* nsIStreamConverter provides an interface to implement when you have code
Expand Down
6 changes: 4 additions & 2 deletions netwerk/streamconv/public/nsIStreamConverterService.idl
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@
* 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/. */

#include "nsIInputStream.idl"
#include "nsIStreamListener.idl"
#include "nsISupports.idl"

interface nsIInputStream;
interface nsIStreamListener;

%{C++
#define NS_ISTREAMCONVERTER_KEY "@mozilla.org/streamconv;1"
Expand Down
1 change: 0 additions & 1 deletion netwerk/streamconv/public/nsITXTToHTMLConv.idl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */

#include "nsIStreamConverter.idl"
#include "nsrootidl.idl"

[scriptable, uuid(933355f6-1dd2-11b2-a9b0-d335b9e35983)]
interface nsITXTToHTMLConv : nsIStreamConverter {
Expand Down
1 change: 1 addition & 0 deletions netwerk/test/TestUDPServerSocket.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include "nsISocketTransport.h"
#include "nsIOutputStream.h"
#include "nsIInputStream.h"
#include "nsINetAddr.h"

#define UDP_PORT 1234
#define REQUEST 0x68656c6f
Expand Down
3 changes: 1 addition & 2 deletions netwerk/wifi/nsIWifiListener.idl
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */

#include "nsISupports.idl"
#include "nsIArray.idl"

#include "nsIWifiAccessPoint.idl"
interface nsIWifiAccessPoint;

[scriptable, uuid(BCD4BEDE-F4A5-4A62-9071-D7A60174E376)]
interface nsIWifiListener : nsISupports
Expand Down
Loading

0 comments on commit fa89d8c

Please sign in to comment.