Bug 846918: Adds internal httpchannel idl for communication between documents and channels. r=jlebar

This commit is contained in:
Ivan Alagenchev 2013-07-26 08:37:02 -07:00
Родитель 99445148b2
Коммит c130661158
5 изменённых файлов: 100 добавлений и 0 удалений

Просмотреть файл

@ -22,6 +22,7 @@ XPIDL_SOURCES += [
'nsIMessageLoop.idl',
'nsIMutable.idl',
'nsIProgrammingLanguage.idl',
'nsISecurityConsoleMessage.idl',
'nsISupports.idl',
'nsITraceRefcnt.idl',
'nsIUUIDGenerator.idl',
@ -103,6 +104,7 @@ CPP_SOURCES += [
'nsMemoryInfoDumper.cpp',
'nsMemoryReporterManager.cpp',
'nsMessageLoop.cpp',
'nsSecurityConsoleMessage.cpp',
'nsStackWalk.cpp',
'nsSystemInfo.cpp',
'nsTraceRefcntImpl.cpp',

Просмотреть файл

@ -0,0 +1,20 @@
/* 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"
/*
* Holds localization message tag and message category
* for security related console messages.
*/
[uuid(FE9FC9B6-DDE2-11E2-A8F1-0A326188709B)]
interface nsISecurityConsoleMessage : nsISupports
{
attribute AString tag;
attribute AString category;
};
%{ C++
#define NS_SECURITY_CONSOLE_MESSAGE_CONTRACTID "@mozilla.org/securityconsole/message;1"
%}

Просмотреть файл

@ -0,0 +1,43 @@
/* 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 "nsSecurityConsoleMessage.h"
NS_IMPL_ISUPPORTS1(nsSecurityConsoleMessage, nsISecurityConsoleMessage)
nsSecurityConsoleMessage::nsSecurityConsoleMessage()
{
}
nsSecurityConsoleMessage::~nsSecurityConsoleMessage()
{
}
NS_IMETHODIMP
nsSecurityConsoleMessage::GetTag(nsAString& aTag)
{
aTag = mTag;
return NS_OK;
}
NS_IMETHODIMP
nsSecurityConsoleMessage::SetTag(const nsAString& aTag)
{
mTag = aTag;
return NS_OK;
}
NS_IMETHODIMP
nsSecurityConsoleMessage::GetCategory(nsAString& aCategory)
{
aCategory = mCategory;
return NS_OK;
}
NS_IMETHODIMP
nsSecurityConsoleMessage::SetCategory(const nsAString& aCategory)
{
mCategory = aCategory;
return NS_OK;
}

Просмотреть файл

@ -0,0 +1,28 @@
/* 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/. */
#ifndef nsSecurityConsoleMessage_h__
#define nsSecurityConsoleMessage_h__
#include "nsISecurityConsoleMessage.h"
#include "nsString.h"
class nsSecurityConsoleMessage : public nsISecurityConsoleMessage
{
public:
NS_DECL_ISUPPORTS
NS_DECL_NSISECURITYCONSOLEMESSAGE
nsSecurityConsoleMessage();
private:
~nsSecurityConsoleMessage();
protected:
nsString mTag;
nsString mCategory;
};
#define NS_SECURITY_CONSOLE_MESSAGE_CID \
{0x43ebf210, 0x8a7b, 0x4ddb, {0xa8, 0x3d, 0xb8, 0x7c, 0x51, 0xa0, 0x58, 0xdb}}
#endif //nsSecurityConsoleMessage_h__

Просмотреть файл

@ -99,6 +99,7 @@ extern nsresult nsStringInputStreamConstructor(nsISupports *, REFNSIID, void **)
#include "nsSystemInfo.h"
#include "nsMemoryReporterManager.h"
#include "nsMemoryInfoDumper.h"
#include "nsSecurityConsoleMessage.h"
#include "nsMessageLoop.h"
#include <locale.h>
@ -209,6 +210,8 @@ NS_GENERIC_FACTORY_CONSTRUCTOR(nsMemoryInfoDumper)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsIOUtil)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsSecurityConsoleMessage)
static nsresult
nsThreadManagerGetSingleton(nsISupports* outer,
const nsIID& aIID,
@ -249,6 +252,8 @@ static NS_DEFINE_CID(kSimpleUnicharStreamFactoryCID, NS_SIMPLE_UNICHAR_STREAM_FA
NS_DEFINE_NAMED_CID(NS_CHROMEREGISTRY_CID);
NS_DEFINE_NAMED_CID(NS_CHROMEPROTOCOLHANDLER_CID);
NS_DEFINE_NAMED_CID(NS_SECURITY_CONSOLE_MESSAGE_CID);
NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(nsChromeRegistry,
nsChromeRegistry::GetSingleton)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsChromeProtocolHandler)
@ -283,6 +288,7 @@ const mozilla::Module::CIDEntry kXPCOMCIDEntries[] = {
#include "XPCOMModule.inc"
{ &kNS_CHROMEREGISTRY_CID, false, NULL, nsChromeRegistryConstructor },
{ &kNS_CHROMEPROTOCOLHANDLER_CID, false, NULL, nsChromeProtocolHandlerConstructor },
{ &kNS_SECURITY_CONSOLE_MESSAGE_CID, false, NULL, nsSecurityConsoleMessageConstructor },
{ NULL }
};
#undef COMPONENT
@ -293,6 +299,7 @@ const mozilla::Module::ContractIDEntry kXPCOMContracts[] = {
{ NS_CHROMEREGISTRY_CONTRACTID, &kNS_CHROMEREGISTRY_CID },
{ NS_NETWORK_PROTOCOL_CONTRACTID_PREFIX "chrome", &kNS_CHROMEPROTOCOLHANDLER_CID },
{ NS_INIPARSERFACTORY_CONTRACTID, &kINIParserFactoryCID },
{ NS_SECURITY_CONSOLE_MESSAGE_CONTRACTID, &kNS_SECURITY_CONSOLE_MESSAGE_CID },
{ NULL }
};
#undef COMPONENT