mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-09 08:48:07 +00:00
Bug 918927 - Minimize the #includes in chrome/; r=bsmedberg
This commit is contained in:
parent
7233ba7103
commit
9527910de7
@ -10,32 +10,20 @@
|
||||
|
||||
*/
|
||||
|
||||
#include "nsAutoPtr.h"
|
||||
#include "nsChromeProtocolHandler.h"
|
||||
#include "nsChromeRegistry.h"
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsContentCID.h"
|
||||
#include "nsCRT.h"
|
||||
#include "nsThreadUtils.h"
|
||||
#include "nsIChannel.h"
|
||||
#include "nsIChromeRegistry.h"
|
||||
#include "nsIComponentManager.h"
|
||||
#include "nsIFile.h"
|
||||
#include "nsIFileURL.h"
|
||||
#include "nsIFileChannel.h"
|
||||
#include "nsIIOService.h"
|
||||
#include "nsIJARChannel.h"
|
||||
#include "nsIJARURI.h"
|
||||
#include "nsILoadGroup.h"
|
||||
#include "nsIObjectOutputStream.h"
|
||||
#include "nsIScriptSecurityManager.h"
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nsIStandardURL.h"
|
||||
#include "nsIStreamListener.h"
|
||||
#include "nsNetUtil.h"
|
||||
#include "nsXPIDLString.h"
|
||||
#include "nsString.h"
|
||||
#include "prlog.h"
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
@ -8,33 +8,23 @@
|
||||
#include "nsChromeRegistryChrome.h"
|
||||
#include "nsChromeRegistryContent.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include "prio.h"
|
||||
#include "prprf.h"
|
||||
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsError.h"
|
||||
#include "nsEscape.h"
|
||||
#include "nsLayoutCID.h"
|
||||
#include "nsNetUtil.h"
|
||||
#include "nsString.h"
|
||||
#include "nsUnicharUtils.h"
|
||||
|
||||
#include "nsCSSStyleSheet.h"
|
||||
#include "nsIConsoleService.h"
|
||||
#include "nsIDocument.h"
|
||||
#include "nsIDOMDocument.h"
|
||||
#include "nsIDocShell.h"
|
||||
#include "nsIDOMElement.h"
|
||||
#include "nsIDOMLocation.h"
|
||||
#include "nsIDOMWindowCollection.h"
|
||||
#include "nsIDOMWindow.h"
|
||||
#include "nsIIOService.h"
|
||||
#include "nsIJARProtocolHandler.h"
|
||||
#include "nsIObserverService.h"
|
||||
#include "nsIPresShell.h"
|
||||
#include "nsIProtocolHandler.h"
|
||||
#include "nsIScriptError.h"
|
||||
#include "nsIWindowMediator.h"
|
||||
|
||||
|
@ -6,31 +6,24 @@
|
||||
#ifndef nsChromeRegistry_h
|
||||
#define nsChromeRegistry_h
|
||||
|
||||
#include "nsIChromeRegistry.h"
|
||||
#include "nsIToolkitChromeRegistry.h"
|
||||
#include "nsIObserver.h"
|
||||
#include "nsWeakReference.h"
|
||||
#include "nsIPrefBranch.h"
|
||||
|
||||
#ifdef MOZ_XUL
|
||||
#include "nsIXULOverlayProvider.h"
|
||||
#endif
|
||||
|
||||
#include "pldhash.h"
|
||||
|
||||
#include "nsCOMArray.h"
|
||||
#include "nsString.h"
|
||||
#include "nsTHashtable.h"
|
||||
#include "nsURIHashKey.h"
|
||||
#include "nsInterfaceHashtable.h"
|
||||
#include "nsXULAppAPI.h"
|
||||
#include "nsIResProtocolHandler.h"
|
||||
#include "nsIXPConnect.h"
|
||||
|
||||
#include "mozilla/Omnijar.h"
|
||||
#include "mozilla/FileLocation.h"
|
||||
|
||||
class nsIDOMWindow;
|
||||
class nsIPrefBranch;
|
||||
class nsIURL;
|
||||
|
||||
// The chrome registry is actually split between nsChromeRegistryChrome and
|
||||
|
@ -13,35 +13,27 @@
|
||||
#include <windows.h>
|
||||
#elif defined(XP_MACOSX)
|
||||
#include <CoreServices/CoreServices.h>
|
||||
#elif defined(MOZ_WIDGET_GTK)
|
||||
#include <gtk/gtk.h>
|
||||
#endif
|
||||
|
||||
#include "nsArrayEnumerator.h"
|
||||
#include "nsAppDirectoryServiceDefs.h"
|
||||
#include "nsComponentManager.h"
|
||||
#include "nsEnumeratorUtils.h"
|
||||
#include "nsNetUtil.h"
|
||||
#include "nsStringEnumerator.h"
|
||||
#include "nsTextFormatter.h"
|
||||
#include "nsUnicharUtils.h"
|
||||
#include "nsXPCOMCIDInternal.h"
|
||||
#include "nsZipArchive.h"
|
||||
|
||||
#include "mozilla/LookAndFeel.h"
|
||||
|
||||
#include "nsICommandLine.h"
|
||||
#include "nsILocaleService.h"
|
||||
#include "nsIFile.h"
|
||||
#include "nsIObserverService.h"
|
||||
#include "nsIPrefBranch.h"
|
||||
#include "nsIPrefService.h"
|
||||
#include "mozilla/Preferences.h"
|
||||
#include "nsIResProtocolHandler.h"
|
||||
#include "nsIScriptError.h"
|
||||
#include "nsIVersionComparator.h"
|
||||
#include "nsIXPConnect.h"
|
||||
#include "nsIXULAppInfo.h"
|
||||
#include "nsIXULRuntime.h"
|
||||
|
||||
#define UILOCALE_CMD_LINE_ARG "UILocale"
|
||||
|
@ -6,6 +6,7 @@
|
||||
#ifndef nsChromeRegistryChrome_h
|
||||
#define nsChromeRegistryChrome_h
|
||||
|
||||
#include "nsCOMArray.h"
|
||||
#include "nsChromeRegistry.h"
|
||||
#include "nsVoidArray.h"
|
||||
#include "mozilla/Move.h"
|
||||
|
@ -4,11 +4,10 @@
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include "RegistryMessageUtils.h"
|
||||
#include "nsChromeRegistry.h"
|
||||
#include "nsChromeRegistryContent.h"
|
||||
#include "nsString.h"
|
||||
#include "nsNetUtil.h"
|
||||
#include "nsResProtocolHandler.h"
|
||||
#include "nsIResProtocolHandler.h"
|
||||
|
||||
nsChromeRegistryContent::nsChromeRegistryContent()
|
||||
{
|
||||
|
@ -7,10 +7,8 @@
|
||||
#define nsChromeRegistryContent_h
|
||||
|
||||
#include "nsChromeRegistry.h"
|
||||
#include "nsTArray.h"
|
||||
#include "nsClassHashtable.h"
|
||||
|
||||
class nsCString;
|
||||
struct ChromePackage;
|
||||
struct ResourceMapping;
|
||||
struct OverrideMapping;
|
||||
|
@ -8,6 +8,24 @@
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
FileLocation::FileLocation()
|
||||
{
|
||||
}
|
||||
|
||||
FileLocation::~FileLocation()
|
||||
{
|
||||
}
|
||||
|
||||
FileLocation::FileLocation(nsIFile* file)
|
||||
{
|
||||
Init(file);
|
||||
}
|
||||
|
||||
FileLocation::FileLocation(nsIFile* file, const char *path)
|
||||
{
|
||||
Init(file, path);
|
||||
}
|
||||
|
||||
FileLocation::FileLocation(const FileLocation &file, const char *path)
|
||||
{
|
||||
if (file.IsZip()) {
|
||||
@ -50,6 +68,30 @@ FileLocation::FileLocation(const FileLocation &file, const char *path)
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
FileLocation::Init(nsIFile* file)
|
||||
{
|
||||
mBaseZip = NULL;
|
||||
mBaseFile = file;
|
||||
mPath.Truncate();
|
||||
}
|
||||
|
||||
void
|
||||
FileLocation::Init(nsIFile* file, const char* path)
|
||||
{
|
||||
mBaseZip = NULL;
|
||||
mBaseFile = file;
|
||||
mPath = path;
|
||||
}
|
||||
|
||||
void
|
||||
FileLocation::Init(nsZipArchive* zip, const char* path)
|
||||
{
|
||||
mBaseZip = zip;
|
||||
mBaseFile = NULL;
|
||||
mPath = path;
|
||||
}
|
||||
|
||||
void
|
||||
FileLocation::GetURIString(nsACString &result) const
|
||||
{
|
||||
|
@ -31,29 +31,21 @@ public:
|
||||
* When the archive is in an archive, an nsZipArchive is stored instead
|
||||
* of a file path.
|
||||
*/
|
||||
FileLocation() { }
|
||||
FileLocation();
|
||||
~FileLocation();
|
||||
|
||||
/**
|
||||
* Constructor for plain files
|
||||
*/
|
||||
FileLocation(nsIFile *file)
|
||||
{
|
||||
Init(file);
|
||||
}
|
||||
FileLocation(nsIFile *file);
|
||||
|
||||
/**
|
||||
* Constructors for path within an archive. The archive can be given either
|
||||
* as nsIFile or nsZipArchive.
|
||||
*/
|
||||
FileLocation(nsIFile *zip, const char *path)
|
||||
{
|
||||
Init(zip, path);
|
||||
}
|
||||
FileLocation(nsIFile *zip, const char *path);
|
||||
|
||||
FileLocation(nsZipArchive *zip, const char *path)
|
||||
{
|
||||
Init(zip, path);
|
||||
}
|
||||
FileLocation(nsZipArchive *zip, const char *path);
|
||||
|
||||
/**
|
||||
* Creates a new file location relative to another one.
|
||||
@ -63,26 +55,11 @@ public:
|
||||
/**
|
||||
* Initialization functions corresponding to constructors
|
||||
*/
|
||||
void Init(nsIFile *file)
|
||||
{
|
||||
mBaseZip = NULL;
|
||||
mBaseFile = file;
|
||||
mPath.Truncate();
|
||||
}
|
||||
void Init(nsIFile *file);
|
||||
|
||||
void Init(nsIFile *zip, const char *path)
|
||||
{
|
||||
mBaseZip = NULL;
|
||||
mBaseFile = zip;
|
||||
mPath = path;
|
||||
}
|
||||
void Init(nsIFile *zip, const char *path);
|
||||
|
||||
void Init(nsZipArchive *zip, const char *path)
|
||||
{
|
||||
mBaseZip = zip;
|
||||
mBaseFile = NULL;
|
||||
mPath = path;
|
||||
}
|
||||
void Init(nsZipArchive *zip, const char *path);
|
||||
|
||||
/**
|
||||
* Returns an URI string corresponding to the file location
|
||||
|
Loading…
x
Reference in New Issue
Block a user