Skip to content

Commit

Permalink
Bug 919341 - Minimize the #includes in xpcom/ IDL files; r=bsmedberg
Browse files Browse the repository at this point in the history
  • Loading branch information
ehsan committed Sep 23, 2013
1 parent 6c5e9df commit c8d51e9
Show file tree
Hide file tree
Showing 58 changed files with 73 additions and 30 deletions.
1 change: 1 addition & 0 deletions accessible/src/atk/AccessibleWrap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#include "Relation.h"
#include "RootAccessible.h"
#include "States.h"
#include "nsISimpleEnumerator.h"

#include "mozilla/Util.h"
#include "nsXPCOMStrings.h"
Expand Down
1 change: 1 addition & 0 deletions accessible/src/windows/msaa/AccessibleWrap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
#include "oleacc.h"
#include "nsIAccessibleTypes.h"
#include "nsIPersistentProperties2.h"
#include "nsISimpleEnumerator.h"

using namespace mozilla;
using namespace mozilla::a11y;
Expand Down
1 change: 1 addition & 0 deletions content/base/src/nsCopySupport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
#include "nsGUIEvent.h"
#include "nsIFrame.h"
#include "nsIURI.h"
#include "nsISimpleEnumerator.h"

// image copy stuff
#include "nsIImageLoadingContent.h"
Expand Down
1 change: 1 addition & 0 deletions content/media/webspeech/synth/pico/nsPicoService.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include "nsPrintfCString.h"
#include "nsIWeakReferenceUtils.h"
#include "SharedBuffer.h"
#include "nsISimpleEnumerator.h"

#include "mozilla/dom/nsSynthVoiceRegistry.h"
#include "mozilla/dom/nsSpeechTask.h"
Expand Down
2 changes: 1 addition & 1 deletion content/xbl/src/nsXBLPrototypeBinding.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
#include "nsContentUtils.h"
#include "nsTextFragment.h"
#include "nsTextNode.h"

#include "nsIInterfaceInfo.h"
#include "nsIScriptError.h"

#include "nsIStyleRuleProcessor.h"
Expand Down
1 change: 1 addition & 0 deletions content/xslt/src/xpath/txXPCOMExtensionFunction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#include "txXPathObjectAdaptor.h"
#include "mozilla/Attributes.h"
#include "nsIClassInfo.h"
#include "nsIInterfaceInfo.h"

NS_IMPL_ISUPPORTS1(txXPathObjectAdaptor, txIXPathObject)

Expand Down
1 change: 1 addition & 0 deletions dom/base/DOMException.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#include "nsIDocument.h"
#include "nsIDOMDOMException.h"
#include "nsIException.h"
#include "nsIProgrammingLanguage.h"
#include "nsMemory.h"
#include "prprf.h"
#include "xpcprivate.h"
Expand Down
1 change: 1 addition & 0 deletions dom/base/nsScriptNameSpaceManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
#include "nsDOMClassInfo.h"
#include "nsCRT.h"
#include "nsIObserverService.h"
#include "nsISimpleEnumerator.h"

#include "mozilla/MemoryReporting.h"
#include "mozilla/Preferences.h"
Expand Down
1 change: 1 addition & 0 deletions dom/indexedDB/Client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#include "IDBDatabase.h"
#include "IndexedDatabaseManager.h"
#include "TransactionThreadPool.h"
#include "nsISimpleEnumerator.h"

USING_INDEXEDDB_NAMESPACE
using mozilla::dom::quota::AssertIsOnIOThread;
Expand Down
1 change: 1 addition & 0 deletions dom/plugins/base/nsPluginsDirUnix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#include "prmem.h"
#include "prenv.h"
#include "prerror.h"
#include "prio.h"
#include <sys/stat.h>
#include "nsString.h"
#include "nsIFile.h"
Expand Down
1 change: 1 addition & 0 deletions dom/quota/FileStreams.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include "FileStreams.h"

#include "QuotaManager.h"
#include "prio.h"

USING_QUOTA_NAMESPACE

Expand Down
1 change: 1 addition & 0 deletions embedding/browser/webBrowser/nsEmbedStream.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */

#include "nsIAsyncInputStream.h"
#include "nsIAsyncOutputStream.h"
#include "nsIDocShell.h"
#include "nsIInterfaceRequestorUtils.h"
#include "nsIPipe.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#include "nsXPCOM.h"
#include "nsISupportsPrimitives.h"
#include "nsAppStartupNotifier.h"

#include "nsISimpleEnumerator.h"

NS_IMPL_ISUPPORTS1(nsAppStartupNotifier, nsIObserver)

Expand Down
1 change: 1 addition & 0 deletions extensions/spellcheck/src/mozSpellChecker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include "nsIStringEnumerator.h"
#include "nsICategoryManager.h"
#include "nsISupportsPrimitives.h"
#include "nsISimpleEnumerator.h"

#define DEFAULT_SPELL_CHECKER "@mozilla.org/spellchecker/engine;1"

Expand Down
1 change: 1 addition & 0 deletions extensions/spellcheck/src/mozSpellCheckerFactory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#include "nsTextServicesCID.h"
#include "mozPersonalDictionary.h"
#include "mozSpellI18NManager.h"
#include "nsIFile.h"

#define NS_SPELLCHECKER_CID \
{ /* 8227f019-afc7-461e-b030-9f185d7a0e29 */ \
Expand Down
1 change: 1 addition & 0 deletions netwerk/base/src/BackgroundFileSaver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

#include "BackgroundFileSaver.h"
#include "mozilla/Telemetry.h"
#include "nsIAsyncInputStream.h"

namespace mozilla {
namespace net {
Expand Down
1 change: 1 addition & 0 deletions netwerk/base/src/nsDirectoryIndexStream.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#include "nsEscape.h"
#include "nsDirectoryIndexStream.h"
#include "prlog.h"
#include "prtime.h"
#ifdef PR_LOGGING
static PRLogModuleInfo* gLog;
#endif
Expand Down
1 change: 1 addition & 0 deletions netwerk/cache/nsDeleteDir.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#include "nsThreadUtils.h"
#include "nsISupportsPriority.h"
#include "nsCacheUtils.h"
#include "prtime.h"
#include <time.h>

using namespace mozilla;
Expand Down
2 changes: 2 additions & 0 deletions netwerk/protocol/about/nsAboutCacheEntry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
#include "nsNetUtil.h"
#include "prprf.h"
#include "nsEscape.h"
#include "nsIAsyncInputStream.h"
#include "nsIAsyncOutputStream.h"
#include <algorithm>

#define HEXDUMP_MAX_ROWS 16
Expand Down
1 change: 1 addition & 0 deletions netwerk/streamconv/src/nsStreamConverterService.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
#include "nsTArray.h"
#include "nsServiceManagerUtils.h"
#include "nsHashtable.h"
#include "nsISimpleEnumerator.h"

///////////////////////////////////////////////////////////////////
// Breadth-First-Search (BFS) algorithm state classes and types.
Expand Down
1 change: 1 addition & 0 deletions netwerk/test/PropertiesTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#include <stdio.h>
#include "nsComponentManagerUtils.h"
#include "nsServiceManagerUtils.h"
#include "nsISimpleEnumerator.h"

#define TEST_URL "resource:/res/test.properties"
static NS_DEFINE_CID(kPersistentPropertiesCID, NS_IPERSISTENTPROPERTIES_CID);
Expand Down
1 change: 1 addition & 0 deletions storage/src/VacuumManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#include "nsIFile.h"
#include "nsThreadUtils.h"
#include "prlog.h"
#include "prtime.h"

#include "mozStorageConnection.h"
#include "mozIStorageStatement.h"
Expand Down
1 change: 1 addition & 0 deletions storage/test/test_file_perms.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

#include "storage_test_harness.h"
#include "nsIFile.h"
#include "prio.h"

/**
* This file tests that the file permissions of the sqlite files match what
Expand Down
1 change: 1 addition & 0 deletions toolkit/components/places/Database.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
#include "nsPrintfCString.h"
#include "mozilla/Preferences.h"
#include "mozilla/Services.h"
#include "prtime.h"

// Time between corrupt database backups.
#define RECENT_BACKUP_TIME_MICROSEC (int64_t)86400 * PR_USEC_PER_SEC // 24H
Expand Down
1 change: 1 addition & 0 deletions toolkit/xre/ProfileReset.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#include "nsXREAppData.h"

#include "mozilla/Services.h"
#include "prtime.h"

extern const nsXREAppData* gAppData;

Expand Down
1 change: 1 addition & 0 deletions tools/profiler/TableTicker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#include "platform.h"
#include "nsThreadUtils.h"
#include "prenv.h"
#include "prtime.h"
#include "shared-libraries.h"
#include "mozilla/StackWalk.h"
#include "TableTicker.h"
Expand Down
1 change: 1 addition & 0 deletions widget/gtk2/nsGtkIMModule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#define FORCE_PR_LOG /* Allow logging in the release build */
#endif // MOZ_LOGGING
#include "prlog.h"
#include "prtime.h"

#include "nsGtkIMModule.h"
#include "nsWindow.h"
Expand Down
1 change: 1 addition & 0 deletions xpcom/base/nsConsoleService.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#include "nsConsoleService.h"
#include "nsConsoleMessage.h"
#include "nsIClassInfoImpl.h"
#include "nsIConsoleListener.h"

#include "mozilla/Preferences.h"

Expand Down
3 changes: 2 additions & 1 deletion xpcom/base/nsIConsoleListener.idl
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
*/

#include "nsISupports.idl"
#include "nsIConsoleMessage.idl"

interface nsIConsoleMessage;

[scriptable, uuid(eaaf61d6-1dd1-11b2-bc6e-8fc96480f20d)]
interface nsIConsoleListener : nsISupports
Expand Down
5 changes: 3 additions & 2 deletions xpcom/base/nsIConsoleService.idl
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */

#include "nsISupports.idl"
#include "nsIConsoleListener.idl"
#include "nsIConsoleMessage.idl"

interface nsIConsoleListener;
interface nsIConsoleMessage;

[scriptable, uuid(0eb81d20-c37e-42d4-82a8-ca9ae96bdf52)]
interface nsIConsoleService : nsISupports
Expand Down
1 change: 0 additions & 1 deletion xpcom/base/nsIException.idl
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@


#include "nsISupports.idl"
#include "nsIProgrammingLanguage.idl"

// XXX - most "string"s in this file should probably move to Unicode
// so may as well use AStrings...
Expand Down
1 change: 1 addition & 0 deletions xpcom/components/nsCategoryManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
#include "mozilla/Services.h"

#include "ManifestParser.h"
#include "nsISimpleEnumerator.h"

using namespace mozilla;
class nsIComponentLoaderManager;
Expand Down
3 changes: 2 additions & 1 deletion xpcom/components/nsICategoryManager.idl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */

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

interface nsISimpleEnumerator;

/*
* nsICategoryManager
Expand Down
1 change: 1 addition & 0 deletions xpcom/ds/nsAtomService.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */

#include "nsAtomService.h"
#include "nsIAtom.h"

NS_IMPL_ISUPPORTS1(nsAtomService, nsIAtomService)

Expand Down
4 changes: 3 additions & 1 deletion xpcom/ds/nsIAtomService.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 "nsIAtom.idl"
#include "nsISupports.idl"

interface nsIAtom;

%{C++
#define NS_ATOMSERVICE_CID \
Expand Down
3 changes: 2 additions & 1 deletion xpcom/ds/nsICollection.idl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */

#include "nsISerializable.idl"
#include "nsIEnumerator.idl"

interface nsIEnumerator;

[scriptable, uuid(83b6019c-cbc4-11d2-8cca-0060b0fc14a3)]
interface nsICollection : nsISerializable
Expand Down
2 changes: 1 addition & 1 deletion xpcom/ds/nsIEnumerator.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 "nsISimpleEnumerator.idl"
#include "nsISupports.idl"

%{C++
#define NS_ENUMERATOR_FALSE 1
Expand Down
3 changes: 1 addition & 2 deletions xpcom/ds/nsIPersistentProperties2.idl
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,11 @@
* 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 "nsIProperties.idl"
#include "nsISimpleEnumerator.idl"

interface nsIInputStream;
interface nsIOutputStream;
interface nsISimpleEnumerator;

[scriptable, uuid(283EE646-1AEF-11D4-98B3-00C04fA0CE9A)]
interface nsIPropertyElement : nsISupports {
Expand Down
1 change: 0 additions & 1 deletion xpcom/ds/nsISupportsArray.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 "nsICollection.idl"

/*
Expand Down
1 change: 0 additions & 1 deletion xpcom/io/nsIBinaryInputStream.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 "nsIInputStream.idl"
#include "nsrootidl.idl"

/**
* This interface allows consumption of primitive data types from a "binary
Expand Down
1 change: 0 additions & 1 deletion xpcom/io/nsIBinaryOutputStream.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 "nsIOutputStream.idl"
#include "nsrootidl.idl"

/**
* This interface allows writing of primitive data types (integers,
Expand Down
4 changes: 3 additions & 1 deletion xpcom/io/nsIDirectoryService.idl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */

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

interface nsIFile;
interface nsISimpleEnumerator;

/**
* nsIDirectoryServiceProvider
Expand Down
4 changes: 2 additions & 2 deletions xpcom/io/nsIFile.idl
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
#include "nsISupports.idl"

%{C++
#include "prio.h"
#include "prlink.h"
struct PRFileDesc;
struct PRLibrary;
#include <stdio.h>
%}

Expand Down
1 change: 0 additions & 1 deletion xpcom/io/nsIObjectInputStream.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 "nsIBinaryInputStream.idl"
#include "nsrootidl.idl"

/**
* @see nsIObjectOutputStream
Expand Down
1 change: 0 additions & 1 deletion xpcom/io/nsIObjectOutputStream.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 "nsIBinaryOutputStream.idl"
#include "nsrootidl.idl"

/**
* @See nsIObjectInputStream
Expand Down
Loading

0 comments on commit c8d51e9

Please sign in to comment.