From 8c43a4f37f5246c95a1dcedd2d26019bb9597066 Mon Sep 17 00:00:00 2001 From: Ehsan Akhgari Date: Mon, 23 Sep 2013 17:30:40 -0400 Subject: [PATCH] Bug 919505 - Minimize the #includes in dom/ipc; r=jst --- .../base/src/nsInProcessTabChildGlobal.cpp | 1 + docshell/base/nsDefaultURIFixup.cpp | 1 + dom/base/Crypto.cpp | 2 ++ dom/base/nsFocusManager.cpp | 1 + dom/bluetooth/BluetoothA2dpManager.cpp | 1 + dom/bluetooth/BluetoothHidManager.cpp | 1 + .../ipc/BluetoothServiceChildProcess.cpp | 1 + .../DeviceStorageRequestParent.cpp | 1 + dom/indexedDB/IDBFactory.cpp | 1 + dom/ipc/AppProcessChecker.cpp | 2 ++ dom/ipc/Blob.cpp | 1 + dom/ipc/Blob.h | 5 +--- dom/ipc/ContentChild.cpp | 14 +++------- dom/ipc/ContentChild.h | 5 +--- dom/ipc/ContentParent.cpp | 17 ++++------- dom/ipc/ContentParent.h | 12 ++------ dom/ipc/CrashReporterChild.h | 4 --- dom/ipc/CrashReporterParent.cpp | 3 +- dom/ipc/CrashReporterParent.h | 1 - dom/ipc/PreallocatedProcessManager.cpp | 1 + dom/ipc/PreallocatedProcessManager.h | 2 -- dom/ipc/ProcessPriorityManager.cpp | 13 +-------- dom/ipc/ProcessPriorityManager.h | 3 -- dom/ipc/StructuredCloneUtils.cpp | 2 +- dom/ipc/TabChild.cpp | 28 ++----------------- dom/ipc/TabChild.h | 10 +------ dom/ipc/TabContext.cpp | 2 ++ dom/ipc/TabContext.h | 7 ++--- dom/ipc/TabParent.cpp | 11 ++------ dom/ipc/TabParent.h | 7 +---- dom/media/MediaPermissionGonk.cpp | 1 + dom/mobilemessage/src/ipc/SmsChild.cpp | 1 + dom/network/src/TCPSocketParent.cpp | 1 + dom/power/WakeLock.cpp | 1 + dom/src/notification/DesktopNotification.cpp | 1 + dom/src/notification/Notification.cpp | 1 + dom/src/storage/DOMStorageIPC.cpp | 1 + dom/system/gonk/nsVolumeMountLock.cpp | 1 + layout/base/nsPresShell.cpp | 4 +++ layout/ipc/RenderFrameUtils.h | 2 ++ modules/libpref/src/Preferences.cpp | 1 + toolkit/crashreporter/nsExceptionHandler.cpp | 1 + .../exthandler/ExternalHelperAppParent.cpp | 1 + xpcom/base/nsMemoryInfoDumper.cpp | 1 + 44 files changed, 61 insertions(+), 117 deletions(-) diff --git a/content/base/src/nsInProcessTabChildGlobal.cpp b/content/base/src/nsInProcessTabChildGlobal.cpp index e0a4ec9e8c1b..7995491694cb 100644 --- a/content/base/src/nsInProcessTabChildGlobal.cpp +++ b/content/base/src/nsInProcessTabChildGlobal.cpp @@ -20,6 +20,7 @@ #include "nsIMozBrowserFrame.h" #include "nsDOMClassInfoID.h" #include "mozilla/dom/StructuredCloneUtils.h" +#include "js/StructuredClone.h" using mozilla::dom::StructuredCloneData; using mozilla::dom::StructuredCloneClosure; diff --git a/docshell/base/nsDefaultURIFixup.cpp b/docshell/base/nsDefaultURIFixup.cpp index 32ab1755dee7..78ba2b79288c 100644 --- a/docshell/base/nsDefaultURIFixup.cpp +++ b/docshell/base/nsDefaultURIFixup.cpp @@ -22,6 +22,7 @@ #include "mozilla/ipc/InputStreamUtils.h" #include "mozilla/ipc/URIUtils.h" #include "nsIObserverService.h" +#include "nsXULAppAPI.h" using namespace mozilla; diff --git a/dom/base/Crypto.cpp b/dom/base/Crypto.cpp index aebd798d0fc1..f5eaf8784de6 100644 --- a/dom/base/Crypto.cpp +++ b/dom/base/Crypto.cpp @@ -6,6 +6,8 @@ #include "nsCOMPtr.h" #include "nsIRandomGenerator.h" #include "nsPIDOMWindow.h" +#include "MainThreadUtils.h" +#include "nsXULAppAPI.h" #include "mozilla/dom/ContentChild.h" #include "mozilla/dom/CryptoBinding.h" diff --git a/dom/base/nsFocusManager.cpp b/dom/base/nsFocusManager.cpp index ace94abc1257..e6979e5c0708 100644 --- a/dom/base/nsFocusManager.cpp +++ b/dom/base/nsFocusManager.cpp @@ -41,6 +41,7 @@ #include "mozilla/dom/Element.h" #include "mozilla/LookAndFeel.h" #include "mozilla/Preferences.h" +#include "mozilla/Services.h" #include #ifdef MOZ_XUL diff --git a/dom/bluetooth/BluetoothA2dpManager.cpp b/dom/bluetooth/BluetoothA2dpManager.cpp index fa53ae24fd88..fb4b8a57fc4b 100644 --- a/dom/bluetooth/BluetoothA2dpManager.cpp +++ b/dom/bluetooth/BluetoothA2dpManager.cpp @@ -19,6 +19,7 @@ #include "mozilla/StaticPtr.h" #include "nsIAudioManager.h" #include "nsIObserverService.h" +#include "MainThreadUtils.h" using namespace mozilla; diff --git a/dom/bluetooth/BluetoothHidManager.cpp b/dom/bluetooth/BluetoothHidManager.cpp index 35243a87c2a5..b294814da14f 100644 --- a/dom/bluetooth/BluetoothHidManager.cpp +++ b/dom/bluetooth/BluetoothHidManager.cpp @@ -17,6 +17,7 @@ #include "mozilla/Services.h" #include "mozilla/StaticPtr.h" #include "nsIObserverService.h" +#include "MainThreadUtils.h" using namespace mozilla; USING_BLUETOOTH_NAMESPACE diff --git a/dom/bluetooth/ipc/BluetoothServiceChildProcess.cpp b/dom/bluetooth/ipc/BluetoothServiceChildProcess.cpp index 7778fe58e8b2..e472bd0ed39e 100644 --- a/dom/bluetooth/ipc/BluetoothServiceChildProcess.cpp +++ b/dom/bluetooth/ipc/BluetoothServiceChildProcess.cpp @@ -12,6 +12,7 @@ #include "mozilla/dom/ContentChild.h" #include "BluetoothChild.h" +#include "MainThreadUtils.h" USING_BLUETOOTH_NAMESPACE diff --git a/dom/devicestorage/DeviceStorageRequestParent.cpp b/dom/devicestorage/DeviceStorageRequestParent.cpp index 9f2ee590dea9..ca9607dc8d30 100644 --- a/dom/devicestorage/DeviceStorageRequestParent.cpp +++ b/dom/devicestorage/DeviceStorageRequestParent.cpp @@ -13,6 +13,7 @@ #include "nsProxyRelease.h" #include "AppProcessChecker.h" #include "mozilla/Preferences.h" +#include "nsNetCID.h" namespace mozilla { namespace dom { diff --git a/dom/indexedDB/IDBFactory.cpp b/dom/indexedDB/IDBFactory.cpp index 4303c9a2a682..d1d3d2a6d297 100644 --- a/dom/indexedDB/IDBFactory.cpp +++ b/dom/indexedDB/IDBFactory.cpp @@ -44,6 +44,7 @@ #include "IndexedDatabaseManager.h" #include "Key.h" #include "ProfilerHelpers.h" +#include "nsNetUtil.h" #include "ipc/IndexedDBChild.h" diff --git a/dom/ipc/AppProcessChecker.cpp b/dom/ipc/AppProcessChecker.cpp index a85b313a7444..0789ab60d233 100644 --- a/dom/ipc/AppProcessChecker.cpp +++ b/dom/ipc/AppProcessChecker.cpp @@ -6,6 +6,7 @@ * You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "AppProcessChecker.h" +#ifdef MOZ_CHILD_PERMISSIONS #include "ContentParent.h" #include "mozIApplication.h" #include "mozilla/hal_sandbox/PHalParent.h" @@ -15,6 +16,7 @@ using namespace mozilla::dom; using namespace mozilla::hal_sandbox; using namespace mozilla::services; +#endif namespace mozilla { diff --git a/dom/ipc/Blob.cpp b/dom/ipc/Blob.cpp index e9505554e575..80f36d13a6b0 100644 --- a/dom/ipc/Blob.cpp +++ b/dom/ipc/Blob.cpp @@ -28,6 +28,7 @@ #include "ContentChild.h" #include "ContentParent.h" +#include "nsNetCID.h" #define PRIVATE_REMOTE_INPUT_STREAM_IID \ {0x30c7699f, 0x51d2, 0x48c8, {0xad, 0x56, 0xc0, 0x16, 0xd7, 0x6f, 0x71, 0x27}} diff --git a/dom/ipc/Blob.h b/dom/ipc/Blob.h index 78fa76c86cce..f824b2c8fed2 100644 --- a/dom/ipc/Blob.h +++ b/dom/ipc/Blob.h @@ -12,16 +12,13 @@ #include "mozilla/dom/PBlobParent.h" #include "mozilla/dom/PBlobStreamChild.h" #include "mozilla/dom/PBlobStreamParent.h" -#include "mozilla/dom/PContent.h" #include "nsAutoPtr.h" #include "nsCOMPtr.h" #include "nsTArray.h" -#include "nsThreadUtils.h" class nsIDOMBlob; -class nsIIPCSerializableInputStream; -class nsIInputStream; +template class nsRevocableEventPtr; namespace mozilla { namespace dom { diff --git a/dom/ipc/ContentChild.cpp b/dom/ipc/ContentChild.cpp index 5483d05697ac..966f6ce08cce 100644 --- a/dom/ipc/ContentChild.cpp +++ b/dom/ipc/ContentChild.cpp @@ -20,11 +20,9 @@ #include "mozilla/dom/ExternalHelperAppChild.h" #include "mozilla/dom/PCrashReporterChild.h" #include "mozilla/dom/DOMStorageIPC.h" -#include "mozilla/Hal.h" #include "mozilla/hal_sandbox/PHalChild.h" #include "mozilla/ipc/GeckoChildProcessHost.h" #include "mozilla/ipc/TestShellChild.h" -#include "mozilla/ipc/XPCShellEnvironment.h" #include "mozilla/layers/CompositorChild.h" #include "mozilla/layers/ImageBridgeChild.h" #include "mozilla/layers/PCompositorChild.h" @@ -35,17 +33,17 @@ #endif #include "mozilla/unused.h" +#include "nsIConsoleListener.h" +#include "nsIInterfaceRequestorUtils.h" #include "nsIMemoryReporter.h" #include "nsIMemoryInfoDumper.h" #include "nsIMutable.h" #include "nsIObserverService.h" -#include "nsTObserverArray.h" #include "nsIObserver.h" #include "nsIScriptSecurityManager.h" #include "nsServiceManagerUtils.h" #include "nsStyleSheetService.h" #include "nsXULAppAPI.h" -#include "nsWeakReference.h" #include "nsIScriptError.h" #include "nsIConsoleService.h" #include "nsJSEnvironment.h" @@ -56,7 +54,6 @@ #include "nsIJSRuntimeService.h" #include "IHistory.h" -#include "nsDocShellCID.h" #include "nsNetUtil.h" #include "base/message_loop.h" @@ -64,14 +61,13 @@ #include "base/task.h" #include "nsChromeRegistryContent.h" -#include "mozilla/chrome/RegistryMessageUtils.h" #include "nsFrameMessageManager.h" #include "nsIGeolocationProvider.h" -#include "JavaScriptParent.h" #include "mozilla/dom/PMemoryReportRequestChild.h" #ifdef MOZ_PERMISSIONS +#include "nsIScriptSecurityManager.h" #include "nsPermission.h" #include "nsPermissionManager.h" #endif @@ -96,7 +92,6 @@ #include "mozilla/dom/indexedDB/PIndexedDBChild.h" #include "mozilla/dom/mobilemessage/SmsChild.h" -#include "mozilla/dom/telephony/TelephonyChild.h" #include "mozilla/dom/devicestorage/DeviceStorageRequestChild.h" #include "mozilla/dom/bluetooth/PBluetoothChild.h" #include "mozilla/dom/PFMRadioChild.h" @@ -111,13 +106,12 @@ #include "ProcessUtils.h" #include "StructuredCloneUtils.h" #include "URIUtils.h" -#include "nsIScriptSecurityManager.h" #include "nsContentUtils.h" #include "nsIPrincipal.h" #include "nsDeviceStorage.h" #include "AudioChannelService.h" #include "JavaScriptChild.h" -#include "ProcessPriorityManager.h" +#include "mozilla/dom/telephony/PTelephonyChild.h" using namespace base; using namespace mozilla; diff --git a/dom/ipc/ContentChild.h b/dom/ipc/ContentChild.h index f22db3990748..9f92c2b12fcf 100644 --- a/dom/ipc/ContentChild.h +++ b/dom/ipc/ContentChild.h @@ -9,11 +9,8 @@ #include "mozilla/Attributes.h" #include "mozilla/dom/PContentChild.h" -#include "mozilla/dom/TabContext.h" #include "mozilla/dom/ipc/Blob.h" - -#include "nsTArray.h" -#include "nsIConsoleListener.h" +#include "nsWeakPtr.h" struct ChromePackage; class nsIDOMBlob; diff --git a/dom/ipc/ContentParent.cpp b/dom/ipc/ContentParent.cpp index 52e13b9d67fc..2a12b3634d2f 100644 --- a/dom/ipc/ContentParent.cpp +++ b/dom/ipc/ContentParent.cpp @@ -37,7 +37,6 @@ #include "mozilla/dom/GeolocationBinding.h" #include "mozilla/dom/telephony/TelephonyParent.h" #include "SmsParent.h" -#include "mozilla/Hal.h" #include "mozilla/hal_sandbox/PHalParent.h" #include "mozilla/ipc/TestShellParent.h" #include "mozilla/ipc/InputStreamUtils.h" @@ -48,8 +47,6 @@ #include "mozilla/Services.h" #include "mozilla/StaticPtr.h" #include "mozilla/unused.h" -#include "nsAppDirectoryServiceDefs.h" -#include "nsAppDirectoryServiceDefs.h" #include "nsAppRunner.h" #include "nsAutoPtr.h" #include "nsCDefaultURIFixup.h" @@ -59,9 +56,7 @@ #include "nsConsoleMessage.h" #include "nsConsoleService.h" #include "nsDebugImpl.h" -#include "nsDirectoryServiceDefs.h" #include "nsDOMFile.h" -#include "nsExternalHelperAppService.h" #include "nsFrameMessageManager.h" #include "nsHashPropertyBag.h" #include "nsIAlertsService.h" @@ -71,6 +66,7 @@ #include "nsIDOMGeoGeolocation.h" #include "nsIDOMWakeLock.h" #include "nsIDOMWindow.h" +#include "nsIExternalProtocolService.h" #include "nsIFilePicker.h" #include "nsIMemoryReporter.h" #include "nsIMozBrowserFrame.h" @@ -79,14 +75,12 @@ #include "nsIPresShell.h" #include "nsIRemoteBlob.h" #include "nsIScriptError.h" -#include "nsIScriptSecurityManager.h" #include "nsIStyleSheet.h" #include "nsISupportsPrimitives.h" #include "nsIURIFixup.h" #include "nsIWindowWatcher.h" #include "nsServiceManagerUtils.h" #include "nsStyleSheetService.h" -#include "nsSystemInfo.h" #include "nsThreadUtils.h" #include "nsToolkitCompsCID.h" #include "nsWidgetsCID.h" @@ -99,13 +93,12 @@ #include "nsIWebBrowserChrome.h" #include "nsIDocShell.h" -#ifdef ANDROID -# include "gfxAndroidPlatform.h" +#if defined(ANDROID) || defined(LINUX) +#include "nsSystemInfo.h" #endif -#ifdef MOZ_CRASHREPORTER -# include "nsExceptionHandler.h" -# include "nsICrashReporter.h" +#ifdef ANDROID +# include "gfxAndroidPlatform.h" #endif #ifdef MOZ_PERMISSIONS diff --git a/dom/ipc/ContentParent.h b/dom/ipc/ContentParent.h index 6fb06d3ba381..42a4244635e4 100644 --- a/dom/ipc/ContentParent.h +++ b/dom/ipc/ContentParent.h @@ -7,11 +7,7 @@ #ifndef mozilla_dom_ContentParent_h #define mozilla_dom_ContentParent_h -#include "base/waitable_event_watcher.h" - #include "mozilla/dom/PContentParent.h" -#include "mozilla/dom/PMemoryReportRequestParent.h" -#include "mozilla/dom/TabContext.h" #include "mozilla/ipc/GeckoChildProcessHost.h" #include "mozilla/dom/ipc/Blob.h" #include "mozilla/Attributes.h" @@ -22,12 +18,7 @@ #include "nsFrameMessageManager.h" #include "nsIObserver.h" #include "nsIThreadInternal.h" -#include "nsNetUtil.h" -#include "nsIPermissionManager.h" #include "nsIDOMGeoPositionCallback.h" -#include "nsCOMArray.h" -#include "nsDataHashtable.h" -#include "nsHashKeys.h" #include "PermissionMessageUtils.h" #define CHILD_PROCESS_SHUTDOWN_MESSAGE NS_LITERAL_STRING("child-process-shutdown") @@ -36,6 +27,7 @@ class mozIApplication; class nsConsoleService; class nsIDOMBlob; class nsIMemoryReporter; +template class nsDataHashtable; namespace mozilla { @@ -59,6 +51,8 @@ class Element; class TabParent; class PStorageParent; class ClonedMessageData; +class MemoryReport; +class TabContext; class ContentParent : public PContentParent , public nsIObserver diff --git a/dom/ipc/CrashReporterChild.h b/dom/ipc/CrashReporterChild.h index c99adb334275..9eb719e50865 100644 --- a/dom/ipc/CrashReporterChild.h +++ b/dom/ipc/CrashReporterChild.h @@ -8,10 +8,6 @@ #define mozilla_dom_CrashReporterChild_h #include "mozilla/dom/PCrashReporterChild.h" -#ifdef MOZ_CRASHREPORTER -#include "nsExceptionHandler.h" -#include "nsXULAppAPI.h" -#endif namespace mozilla { namespace dom { diff --git a/dom/ipc/CrashReporterParent.cpp b/dom/ipc/CrashReporterParent.cpp index a825b6c428d8..356c2d1c25cb 100644 --- a/dom/ipc/CrashReporterParent.cpp +++ b/dom/ipc/CrashReporterParent.cpp @@ -4,8 +4,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 "CrashReporterParent.h" - -#include "base/process_util.h" +#include "nsXULAppAPI.h" #include diff --git a/dom/ipc/CrashReporterParent.h b/dom/ipc/CrashReporterParent.h index 5f78567ba10c..1af79583a686 100644 --- a/dom/ipc/CrashReporterParent.h +++ b/dom/ipc/CrashReporterParent.h @@ -5,7 +5,6 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "mozilla/dom/PCrashReporterParent.h" #include "mozilla/dom/TabMessageUtils.h" -#include "nsXULAppAPI.h" #include "nsIFile.h" #ifdef MOZ_CRASHREPORTER #include "nsExceptionHandler.h" diff --git a/dom/ipc/PreallocatedProcessManager.cpp b/dom/ipc/PreallocatedProcessManager.cpp index 64eca90a6673..3ce40be08574 100644 --- a/dom/ipc/PreallocatedProcessManager.cpp +++ b/dom/ipc/PreallocatedProcessManager.cpp @@ -8,6 +8,7 @@ #include "mozilla/ClearOnShutdown.h" #include "mozilla/Preferences.h" #include "mozilla/dom/ContentParent.h" +#include "nsIPropertyBag2.h" using namespace mozilla; using namespace mozilla::hal; diff --git a/dom/ipc/PreallocatedProcessManager.h b/dom/ipc/PreallocatedProcessManager.h index 19c2b419738e..025e494fc87a 100644 --- a/dom/ipc/PreallocatedProcessManager.h +++ b/dom/ipc/PreallocatedProcessManager.h @@ -8,10 +8,8 @@ #define mozilla_PreallocatedProcessManager_h #include "base/basictypes.h" -#include "mozilla/StaticPtr.h" #include "nsCOMPtr.h" #include "nsIObserver.h" -#include "nsAutoPtr.h" namespace mozilla { namespace dom { diff --git a/dom/ipc/ProcessPriorityManager.cpp b/dom/ipc/ProcessPriorityManager.cpp index bd7a2bce73da..081e45d669b8 100644 --- a/dom/ipc/ProcessPriorityManager.cpp +++ b/dom/ipc/ProcessPriorityManager.cpp @@ -16,25 +16,14 @@ #include "AudioChannelService.h" #include "prlog.h" #include "nsPrintfCString.h" -#include "nsWeakPtr.h" #include "nsXULAppAPI.h" #include "nsIFrameLoader.h" -#include "nsIInterfaceRequestorUtils.h" -#include "nsITimer.h" -#include "nsIObserver.h" #include "nsIObserverService.h" -#include "nsIDocument.h" -#include "nsIDOMEventListener.h" -#include "nsIDOMWindow.h" -#include "nsIDOMEvent.h" -#include "nsIDOMDocument.h" -#include "nsPIDOMWindow.h" #include "StaticPtr.h" #include "nsIMozBrowserFrame.h" #include "nsIObserver.h" #include "nsITimer.h" -#include "nsPrintfCString.h" -#include "prlog.h" +#include "nsIPropertyBag2.h" #ifdef XP_WIN #include diff --git a/dom/ipc/ProcessPriorityManager.h b/dom/ipc/ProcessPriorityManager.h index 34806d33efd0..9a42f38d169b 100644 --- a/dom/ipc/ProcessPriorityManager.h +++ b/dom/ipc/ProcessPriorityManager.h @@ -8,9 +8,6 @@ #define mozilla_ProcessPriorityManager_h_ #include "mozilla/HalTypes.h" -#include "mozilla/StaticPtr.h" -#include "nsIObserver.h" -#include "nsDataHashtable.h" namespace mozilla { namespace dom { diff --git a/dom/ipc/StructuredCloneUtils.cpp b/dom/ipc/StructuredCloneUtils.cpp index 00f64235d936..60a7808b47b6 100644 --- a/dom/ipc/StructuredCloneUtils.cpp +++ b/dom/ipc/StructuredCloneUtils.cpp @@ -13,7 +13,7 @@ #include "nsContentUtils.h" #include "nsJSEnvironment.h" -#include "nsThreadUtils.h" +#include "MainThreadUtils.h" #include "StructuredCloneTags.h" #include "jsapi.h" diff --git a/dom/ipc/TabChild.cpp b/dom/ipc/TabChild.cpp index 7be72d21e2dc..23275f2ac86a 100644 --- a/dom/ipc/TabChild.cpp +++ b/dom/ipc/TabChild.cpp @@ -9,28 +9,23 @@ #include "TabChild.h" #include "Layers.h" -#include "Blob.h" #include "ContentChild.h" #include "IndexedDBChild.h" #include "mozilla/Preferences.h" #include "mozilla/ClearOnShutdown.h" #include "mozilla/IntentionalCrash.h" #include "mozilla/docshell/OfflineCacheUpdateChild.h" -#include "mozilla/dom/PContentChild.h" #include "mozilla/dom/PContentDialogChild.h" #include "mozilla/ipc/DocumentRendererChild.h" #include "mozilla/ipc/FileDescriptorUtils.h" #include "mozilla/layers/AsyncPanZoomController.h" #include "mozilla/layers/CompositorChild.h" #include "mozilla/layers/ImageBridgeChild.h" -#include "mozilla/layers/PLayerTransactionChild.h" #include "mozilla/layers/ShadowLayers.h" #include "mozilla/layout/RenderFrameChild.h" #include "mozilla/StaticPtr.h" #include "mozilla/unused.h" #include "mozIApplication.h" -#include "nsComponentManagerUtils.h" -#include "nsComponentManagerUtils.h" #include "nsContentUtils.h" #include "nsCxPusher.h" #include "nsEmbedCID.h" @@ -40,51 +35,32 @@ #include "nsExceptionHandler.h" #endif #include "mozilla/dom/Element.h" -#include "nsIAppsService.h" #include "nsIBaseWindow.h" #include "nsICachedFileDescriptorListener.h" -#include "nsIComponentManager.h" +#include "nsIDialogParamBlock.h" #include "nsIDocumentInlines.h" -#include "nsIDOMClassInfo.h" -#include "nsIDOMElement.h" +#include "nsIDocShellTreeOwner.h" #include "nsIDOMEvent.h" #include "nsIDOMWindow.h" #include "nsIDOMWindowUtils.h" #include "nsIDocShell.h" -#include "nsIInterfaceRequestorUtils.h" -#include "nsIInterfaceRequestorUtils.h" -#include "nsIJSRuntimeService.h" -#include "nsISSLStatusProvider.h" -#include "nsIScriptContext.h" -#include "nsIScriptGlobalObject.h" -#include "nsIScriptSecurityManager.h" -#include "nsISecureBrowserUI.h" -#include "nsIServiceManager.h" -#include "nsISupportsImpl.h" #include "nsIURI.h" #include "nsIURIFixup.h" #include "nsCDefaultURIFixup.h" -#include "nsView.h" #include "nsIWebBrowser.h" #include "nsIWebBrowserFocus.h" #include "nsIWebBrowserSetup.h" #include "nsIWebProgress.h" -#include "nsIXPCSecurityManager.h" #include "nsInterfaceHashtable.h" #include "nsPIDOMWindow.h" #include "nsPIWindowRoot.h" -#include "nsGlobalWindow.h" #include "nsLayoutUtils.h" -#include "nsPresContext.h" #include "nsPrintfCString.h" -#include "nsScriptLoader.h" -#include "nsSerializationHelper.h" #include "nsThreadUtils.h" #include "nsWeakReference.h" #include "PCOMContentPermissionRequestChild.h" #include "PuppetWidget.h" #include "StructuredCloneUtils.h" -#include "xpcpublic.h" #include "nsViewportInfo.h" #include "JavaScriptChild.h" #include "APZCCallbackHelper.h" diff --git a/dom/ipc/TabChild.h b/dom/ipc/TabChild.h index 0848deee45fd..d6b9097dae30 100644 --- a/dom/ipc/TabChild.h +++ b/dom/ipc/TabChild.h @@ -18,31 +18,23 @@ #include "nsIWebBrowserChrome2.h" #include "nsIEmbeddingSiteWindow.h" #include "nsIWebBrowserChromeFocus.h" -#include "nsIWidget.h" #include "nsIDOMEventListener.h" #include "nsIInterfaceRequestor.h" #include "nsIWindowProvider.h" #include "nsIDOMWindow.h" #include "nsIDocShell.h" -#include "nsIDocShellTreeItem.h" -#include "nsIDocShellTreeOwner.h" #include "nsIDocument.h" -#include "nsNetUtil.h" +#include "nsIInterfaceRequestorUtils.h" #include "nsFrameMessageManager.h" #include "nsIWebProgressListener.h" #include "nsDOMEventTargetHelper.h" #include "nsIDialogCreator.h" -#include "nsIDialogParamBlock.h" #include "nsIPresShell.h" -#include "nsIPrincipal.h" #include "nsIScriptObjectPrincipal.h" #include "nsWeakReference.h" #include "nsITabChild.h" #include "mozilla/Attributes.h" -#include "FrameMetrics.h" -#include "ProcessUtils.h" #include "mozilla/dom/TabContext.h" -#include "mozilla/dom/ContentChild.h" struct gfxMatrix; class nsICachedFileDescriptorListener; diff --git a/dom/ipc/TabContext.cpp b/dom/ipc/TabContext.cpp index eaea0b33e46c..a774ee097386 100644 --- a/dom/ipc/TabContext.cpp +++ b/dom/ipc/TabContext.cpp @@ -5,9 +5,11 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "mozilla/dom/TabContext.h" +#include "mozilla/dom/PTabContext.h" #include "mozilla/dom/TabParent.h" #include "mozilla/dom/TabChild.h" #include "nsIAppsService.h" +#include "nsIScriptSecurityManager.h" #define NO_APP_ID (nsIScriptSecurityManager::NO_APP_ID) diff --git a/dom/ipc/TabContext.h b/dom/ipc/TabContext.h index 4214dd2033b9..fc6fbfec1e2a 100644 --- a/dom/ipc/TabContext.h +++ b/dom/ipc/TabContext.h @@ -7,16 +7,15 @@ #ifndef mozilla_dom_TabContext_h #define mozilla_dom_TabContext_h -#include "mozilla/Assertions.h" -#include "mozilla/dom/PContent.h" -#include "mozilla/dom/PBrowser.h" #include "mozilla/layout/RenderFrameUtils.h" -#include "nsIScriptSecurityManager.h" #include "mozIApplication.h" +#include "nsCOMPtr.h" namespace mozilla { namespace dom { +struct IPCTabContext; + /** * TabContext encapsulates information about an iframe that may be a mozbrowser * or mozapp. You can ask whether a TabContext corresponds to a mozbrowser or diff --git a/dom/ipc/TabParent.cpp b/dom/ipc/TabParent.cpp index a26fd31754c9..f18159d966a1 100644 --- a/dom/ipc/TabParent.cpp +++ b/dom/ipc/TabParent.cpp @@ -8,7 +8,6 @@ #include "TabParent.h" -#include "Blob.h" #include "IDBFactory.h" #include "IndexedDBParent.h" #include "mozIApplication.h" @@ -25,38 +24,34 @@ #include "nsContentPermissionHelper.h" #include "nsContentUtils.h" #include "nsDebug.h" -#include "nsEventDispatcher.h" #include "nsEventStateManager.h" #include "nsFocusManager.h" #include "nsFrameLoader.h" #include "nsIContent.h" #include "nsIDocShell.h" -#include "nsIDOMApplicationRegistry.h" +#include "nsIDocShellTreeOwner.h" #include "nsIDOMElement.h" #include "nsIDOMEvent.h" -#include "nsIDOMHTMLFrameElement.h" #include "nsIDOMWindow.h" #include "nsIDialogCreator.h" +#include "nsIInterfaceRequestorUtils.h" #include "nsIPromptFactory.h" #include "nsIURI.h" -#include "nsIMozBrowserFrame.h" -#include "nsIScriptSecurityManager.h" #include "nsIWebBrowserChrome.h" #include "nsIXULBrowserWindow.h" #include "nsIXULWindow.h" #include "nsViewManager.h" #include "nsIWidget.h" #include "nsIWindowWatcher.h" -#include "nsNetUtil.h" #include "nsPIDOMWindow.h" #include "nsPrintfCString.h" -#include "nsSerializationHelper.h" #include "nsServiceManagerUtils.h" #include "nsThreadUtils.h" #include "private/pprio.h" #include "StructuredCloneUtils.h" #include "JavaScriptParent.h" #include "TabChild.h" +#include "nsNetCID.h" #include using namespace mozilla::dom; diff --git a/dom/ipc/TabParent.h b/dom/ipc/TabParent.h index bc8f8cd11d11..4e323649f446 100644 --- a/dom/ipc/TabParent.h +++ b/dom/ipc/TabParent.h @@ -7,25 +7,19 @@ #ifndef mozilla_tabs_TabParent_h #define mozilla_tabs_TabParent_h -#include "base/basictypes.h" - -#include "mozilla/dom/ContentParent.h" #include "mozilla/dom/PBrowserParent.h" #include "mozilla/dom/PContentDialogParent.h" #include "mozilla/dom/TabContext.h" -#include "mozilla/ipc/GeckoChildProcessHost.h" #include "nsCOMPtr.h" #include "nsIAuthPromptProvider.h" #include "nsIBrowserDOMWindow.h" #include "nsIDialogParamBlock.h" #include "nsISecureBrowserUI.h" #include "nsITabParent.h" -#include "nsWeakReference.h" #include "Units.h" #include "js/TypeDecls.h" struct gfxMatrix; -class mozIApplication; class nsFrameLoader; class nsIURI; class CpowHolder; @@ -44,6 +38,7 @@ class RenderFrameParent; namespace dom { class ClonedMessageData; +class ContentParent; class Element; struct StructuredCloneData; diff --git a/dom/media/MediaPermissionGonk.cpp b/dom/media/MediaPermissionGonk.cpp index 8ce436ba3be5..fe1862ee3914 100644 --- a/dom/media/MediaPermissionGonk.cpp +++ b/dom/media/MediaPermissionGonk.cpp @@ -18,6 +18,7 @@ #include "mozilla/dom/PBrowserChild.h" #include "mozilla/dom/TabChild.h" #include "mozilla/dom/MediaStreamTrackBinding.h" +#include "nsISupportsPrimitives.h" #define AUDIO_PERMISSION_NAME "audio-capture" diff --git a/dom/mobilemessage/src/ipc/SmsChild.cpp b/dom/mobilemessage/src/ipc/SmsChild.cpp index ead1843576d9..11fa7e440fb1 100644 --- a/dom/mobilemessage/src/ipc/SmsChild.cpp +++ b/dom/mobilemessage/src/ipc/SmsChild.cpp @@ -11,6 +11,7 @@ #include "mozilla/dom/ContentChild.h" #include "mozilla/dom/mobilemessage/Constants.h" // For MessageType #include "MobileMessageThread.h" +#include "MainThreadUtils.h" using namespace mozilla; using namespace mozilla::dom; diff --git a/dom/network/src/TCPSocketParent.cpp b/dom/network/src/TCPSocketParent.cpp index 31732ce76ef0..a911d753f767 100644 --- a/dom/network/src/TCPSocketParent.cpp +++ b/dom/network/src/TCPSocketParent.cpp @@ -14,6 +14,7 @@ #include "mozilla/net/PNeckoParent.h" #include "mozilla/dom/ContentParent.h" #include "mozilla/dom/TabParent.h" +#include "nsIScriptSecurityManager.h" namespace IPC { diff --git a/dom/power/WakeLock.cpp b/dom/power/WakeLock.cpp index 93a8249655af..e7787ea0a1b7 100644 --- a/dom/power/WakeLock.cpp +++ b/dom/power/WakeLock.cpp @@ -14,6 +14,7 @@ #include "nsIDOMWindow.h" #include "nsIDOMEvent.h" #include "nsPIDOMWindow.h" +#include "nsIPropertyBag2.h" DOMCI_DATA(MozWakeLock, mozilla::dom::power::WakeLock) diff --git a/dom/src/notification/DesktopNotification.cpp b/dom/src/notification/DesktopNotification.cpp index 291f6a3c5e90..675771bd3499 100644 --- a/dom/src/notification/DesktopNotification.cpp +++ b/dom/src/notification/DesktopNotification.cpp @@ -12,6 +12,7 @@ #include "nsGlobalWindow.h" #include "nsIAppsService.h" #include "PCOMContentPermissionRequestChild.h" +#include "nsIScriptSecurityManager.h" namespace mozilla { namespace dom { diff --git a/dom/src/notification/Notification.cpp b/dom/src/notification/Notification.cpp index 8488ab456da2..dc91865f68b1 100644 --- a/dom/src/notification/Notification.cpp +++ b/dom/src/notification/Notification.cpp @@ -17,6 +17,7 @@ #include "nsToolkitCompsCID.h" #include "nsGlobalWindow.h" #include "nsDOMJSUtils.h" +#include "nsIScriptSecurityManager.h" #ifdef MOZ_B2G #include "nsIDOMDesktopNotification.h" #include "nsIAppsService.h" diff --git a/dom/src/storage/DOMStorageIPC.cpp b/dom/src/storage/DOMStorageIPC.cpp index 776cd8364916..3826e85b5811 100644 --- a/dom/src/storage/DOMStorageIPC.cpp +++ b/dom/src/storage/DOMStorageIPC.cpp @@ -10,6 +10,7 @@ #include "mozilla/dom/ContentChild.h" #include "mozilla/unused.h" #include "nsIDiskSpaceWatcher.h" +#include "nsThreadUtils.h" namespace mozilla { namespace dom { diff --git a/dom/system/gonk/nsVolumeMountLock.cpp b/dom/system/gonk/nsVolumeMountLock.cpp index 6684d1829ce9..09699e8ed793 100644 --- a/dom/system/gonk/nsVolumeMountLock.cpp +++ b/dom/system/gonk/nsVolumeMountLock.cpp @@ -12,6 +12,7 @@ #include "nsIVolume.h" #include "nsIVolumeService.h" #include "nsString.h" +#include "nsXULAppAPI.h" #define VOLUME_MANAGER_LOG_TAG "nsVolumeMountLock" #include "VolumeManagerLog.h" diff --git a/layout/base/nsPresShell.cpp b/layout/base/nsPresShell.cpp index bfb7bbc71e98..a4d6762360b2 100644 --- a/layout/base/nsPresShell.cpp +++ b/layout/base/nsPresShell.cpp @@ -156,6 +156,10 @@ #include "nsIDOMHTMLElement.h" #include "nsIDragSession.h" +#ifdef ANDROID +#include "nsIDocShellTreeOwner.h" +#endif + #define ANCHOR_SCROLL_FLAGS \ (nsIPresShell::SCROLL_OVERFLOW_HIDDEN | nsIPresShell::SCROLL_NO_PARENT_FRAMES) diff --git a/layout/ipc/RenderFrameUtils.h b/layout/ipc/RenderFrameUtils.h index 59182a403560..568287fbf211 100644 --- a/layout/ipc/RenderFrameUtils.h +++ b/layout/ipc/RenderFrameUtils.h @@ -8,6 +8,8 @@ #ifndef mozilla_layer_RenderFrameUtils_h #define mozilla_layer_RenderFrameUtils_h +#include "ipc/IPCMessageUtils.h" + namespace mozilla { namespace layout { diff --git a/modules/libpref/src/Preferences.cpp b/modules/libpref/src/Preferences.cpp index 2ade9ec0e143..b68d240f350e 100644 --- a/modules/libpref/src/Preferences.cpp +++ b/modules/libpref/src/Preferences.cpp @@ -45,6 +45,7 @@ #include "nsTArray.h" #include "nsRefPtrHashtable.h" #include "nsIMemoryReporter.h" +#include "nsThreadUtils.h" class PrefCallback; diff --git a/toolkit/crashreporter/nsExceptionHandler.cpp b/toolkit/crashreporter/nsExceptionHandler.cpp index 38e2148df887..50b5a1ebc7f5 100644 --- a/toolkit/crashreporter/nsExceptionHandler.cpp +++ b/toolkit/crashreporter/nsExceptionHandler.cpp @@ -11,6 +11,7 @@ #include "mozilla/Util.h" #include "nsThreadUtils.h" +#include "nsXULAppAPI.h" #if defined(XP_WIN32) #ifdef WIN32_LEAN_AND_MEAN diff --git a/uriloader/exthandler/ExternalHelperAppParent.cpp b/uriloader/exthandler/ExternalHelperAppParent.cpp index 66c70049bfd5..4fe33d140abf 100644 --- a/uriloader/exthandler/ExternalHelperAppParent.cpp +++ b/uriloader/exthandler/ExternalHelperAppParent.cpp @@ -16,6 +16,7 @@ #include "nsIBrowserDOMWindow.h" #include "nsStringStream.h" #include "mozilla/ipc/URIUtils.h" +#include "nsNetUtil.h" #include "mozilla/unused.h" diff --git a/xpcom/base/nsMemoryInfoDumper.cpp b/xpcom/base/nsMemoryInfoDumper.cpp index 50f85ac9a256..dcd7b8d6fae1 100644 --- a/xpcom/base/nsMemoryInfoDumper.cpp +++ b/xpcom/base/nsMemoryInfoDumper.cpp @@ -19,6 +19,7 @@ #include "nsGZFileWriter.h" #include "nsJSEnvironment.h" #include "nsPrintfCString.h" +#include "nsISimpleEnumerator.h" #include #ifdef XP_WIN