Bug 919330 - Minimize the #includes in docshell/ IDL files; r=bzbarsky
authorEhsan Akhgari <ehsan@mozilla.com>
Sun, 22 Sep 2013 19:25:21 -0400
changeset 150388 69da3bab9facb91f0e845443f90bf611b6b46a53
parent 150387 3a21097df258672510a448368e226bb37ed23d1b
child 150389 9dbbaffeff0acc3cc7d3dc261335b26420e40829
push idunknown
push userunknown
push dateunknown
reviewersbzbarsky
bugs919330
milestone27.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 919330 - Minimize the #includes in docshell/ IDL files; r=bzbarsky
docshell/base/nsIContentViewerFile.idl
docshell/base/nsIDocShell.idl
docshell/base/nsIMarkupDocumentViewer.idl
docshell/base/nsIReflowObserver.idl
docshell/base/nsIRefreshURI.idl
docshell/shistory/public/nsISHContainer.idl
docshell/shistory/public/nsISHTransaction.idl
docshell/shistory/public/nsISHistoryInternal.idl
xpfe/components/windowds/nsWindowDataSource.cpp
--- a/docshell/base/nsIContentViewerFile.idl
+++ b/docshell/base/nsIContentViewerFile.idl
@@ -1,18 +1,18 @@
 /* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
  *
  * This Source Code Form is subject to the terms of the Mozilla Public
  * 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 "nsIPrintSettings.idl"
 
 interface nsIDOMWindow;
+interface nsIPrintSettings;
 interface nsIWebProgressListener;
 
 %{ C++
 #include <stdio.h>
 %}
 
 [ptr] native FILE(FILE);
 
--- a/docshell/base/nsIDocShell.idl
+++ b/docshell/base/nsIDocShell.idl
@@ -1,17 +1,16 @@
 /* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
  *
  * This Source Code Form is subject to the terms of the Mozilla Public
  * 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 "domstubs.idl"
 #include "nsIDocShellTreeItem.idl"
-#include "nsIAtom.idl"
 
 %{ C++
 #include "js/TypeDecls.h"
 class nsPresContext;
 class nsIPresShell;
 %}
 
 /**
--- a/docshell/base/nsIMarkupDocumentViewer.idl
+++ b/docshell/base/nsIMarkupDocumentViewer.idl
@@ -10,18 +10,18 @@
  * for a markup document - HTML or XML
  */
 
 #include "nsISupports.idl"
 
 interface nsIDOMNode;
 
 %{C++
-#include "nsCOMPtr.h"
-#include "nsTArray.h"
+template<class T> class nsCOMPtr;
+template<class T> class nsTArray;
 %}
 
 interface nsIMarkupDocumentViewer;
 
 [ref] native nsIMarkupDocumentViewerTArray(nsTArray<nsCOMPtr<nsIMarkupDocumentViewer> >);
 
 [scriptable, uuid(23326580-e6ce-4ee1-94b8-f1d9424a9977)]
 interface nsIMarkupDocumentViewer : nsISupports
--- a/docshell/base/nsIReflowObserver.idl
+++ b/docshell/base/nsIReflowObserver.idl
@@ -1,14 +1,13 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * 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 "domstubs.idl"
-#include "nsISupports.idl"
 
 [scriptable, uuid(832e692c-c4a6-11e2-8fd1-dce678957a39)]
 interface nsIReflowObserver : nsISupports
 {
   /**
    * Called when an uninterruptible reflow has occurred.
    *
    * @param start timestamp when reflow ended, in milliseconds since
--- a/docshell/base/nsIRefreshURI.idl
+++ b/docshell/base/nsIRefreshURI.idl
@@ -1,18 +1,19 @@
 /* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
  *
  * This Source Code Form is subject to the terms of the Mozilla Public
  * 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 "nsIURI.idl"
+
 interface nsIChannel;
 interface nsIPrincipal;
+interface nsIURI;
 
 [scriptable, uuid(a5e61a3c-51bd-45be-ac0c-e87b71860656)]
 interface nsIRefreshURI : nsISupports {
     /**
       * Load a uri after waiting for aMillis milliseconds. If the docshell
       * is busy loading a page currently, the refresh request will be
       * queued and executed when the current load finishes. 
       *
--- a/docshell/shistory/public/nsISHContainer.idl
+++ b/docshell/shistory/public/nsISHContainer.idl
@@ -1,16 +1,17 @@
 /* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
  *
  * This Source Code Form is subject to the terms of the Mozilla Public
  * 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 "nsISHEntry.idl"
+
+interface nsISHEntry;
 
 /**
  * The nsISHEntryContainer. The interface to access child entries
  * of an nsISHEntry.
  * 
  */
 
 [scriptable, uuid(65281BA2-988A-11d3-BDC7-0050040A9B44)]
--- a/docshell/shistory/public/nsISHTransaction.idl
+++ b/docshell/shistory/public/nsISHTransaction.idl
@@ -1,16 +1,17 @@
 /* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
  *
  * This Source Code Form is subject to the terms of the Mozilla Public
  * 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 "nsISHEntry.idl"
+
+interface nsISHEntry;
 
 /**
  * The nsISHTransaction.
  */
 
 
 [scriptable, uuid(2EDF705F-D252-4971-9F09-71DD0F760DC6)]
 interface nsISHTransaction : nsISupports
--- a/docshell/shistory/public/nsISHistoryInternal.idl
+++ b/docshell/shistory/public/nsISHistoryInternal.idl
@@ -1,20 +1,21 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * 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 "nsIFactory.idl"
-#include "nsISHEntry.idl"
-#include "nsISHTransaction.idl"
 
+interface nsIBFCacheEntry;
+interface nsISHEntry;
 interface nsISHistoryListener;
+interface nsISHTransaction;
 interface nsIDocShell;
+interface nsIURI;
 
 %{C++
 #define NS_SHISTORY_INTERNAL_CID \
 { 0x9c47c121, 0x1c6e, 0x4d8f, \
   { 0xb9, 0x04, 0x3a, 0xc9, 0x68, 0x11, 0x6e, 0x88 } }
 
 #define NS_SHISTORY_INTERNAL_CONTRACTID "@mozilla.org/browser/shistory-internal;1"
 
--- a/xpfe/components/windowds/nsWindowDataSource.cpp
+++ b/xpfe/components/windowds/nsWindowDataSource.cpp
@@ -8,16 +8,17 @@
 #include "rdf.h"
 #include "nsIRDFContainerUtils.h"
 #include "nsIServiceManager.h"
 #include "nsReadableUtils.h"
 #include "nsIObserverService.h"
 #include "nsIWindowMediator.h"
 #include "nsXPCOMCID.h"
 #include "mozilla/ModuleUtils.h"
+#include "nsString.h"
 
 // just to do the reverse-lookup! sheesh.
 #include "nsIInterfaceRequestorUtils.h"
 #include "nsIDocShell.h"
 
 uint32_t nsWindowDataSource::windowCount = 0;
 
 nsIRDFResource* nsWindowDataSource::kNC_Name = nullptr;