Blob Blame History Raw
# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
# vim: set filetype=python:
# 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/.

with Files('**'):
    BUG_COMPONENT = ('Core', 'Networking: HTTP')

XPIDL_SOURCES += [
    'nsIBackgroundChannelRegistrar.idl',
    'nsIHttpActivityObserver.idl',
    'nsIHttpAuthenticableChannel.idl',
    'nsIHttpAuthenticator.idl',
    'nsIHttpAuthManager.idl',
    'nsIHttpChannel.idl',
    'nsIHttpChannelAuthProvider.idl',
    'nsIHttpChannelChild.idl',
    'nsIHttpChannelInternal.idl',
    'nsIHttpHeaderVisitor.idl',
    'nsIHttpProtocolHandler.idl',
    'nsIRaceCacheWithNetwork.idl',
    'nsIWellKnownOpportunisticUtils.idl',
]

XPIDL_MODULE = 'necko_http'

EXPORTS += [
    'nsCORSListenerProxy.h',
    'nsHttp.h',
    'nsHttpAtomList.h',
    'nsHttpHeaderArray.h',
    'nsHttpRequestHead.h',
    'nsHttpResponseHead.h',
]

EXPORTS.mozilla.net += [
    'AltDataOutputStreamChild.h',
    'AltDataOutputStreamParent.h',
    'HttpAuthUtils.h',
    'HttpBackgroundChannelChild.h',
    'HttpBackgroundChannelParent.h',
    'HttpBaseChannel.h',
    'HttpChannelChild.h',
    'HttpChannelParent.h',
    'HttpInfo.h',
    'nsServerTiming.h',
    'NullHttpChannel.h',
    'PHttpChannelParams.h',
    'PSpdyPush.h',
    'TimingStruct.h',
]

SOURCES += [
    'nsHttpChannelAuthProvider.cpp', # redefines GetAuthType
]

UNIFIED_SOURCES += [
    'AltDataOutputStreamChild.cpp',
    'AltDataOutputStreamParent.cpp',
    'AlternateServices.cpp',
    'ASpdySession.cpp',
    'BackgroundChannelRegistrar.cpp',
    'CacheControlParser.cpp',
    'ConnectionDiagnostics.cpp',
    'Http2Compression.cpp',
    'Http2Push.cpp',
    'Http2Session.cpp',
    'Http2Stream.cpp',
    'HttpAuthUtils.cpp',
    'HttpBackgroundChannelChild.cpp',
    'HttpBackgroundChannelParent.cpp',
    'HttpBaseChannel.cpp',
    'HttpChannelChild.cpp',
    'HttpChannelParent.cpp',
    'HttpChannelParentListener.cpp',
    'HttpInfo.cpp',
    'InterceptedChannel.cpp',
    'InterceptedHttpChannel.cpp',
    'nsCORSListenerProxy.cpp',
    'nsHttp.cpp',
    'nsHttpActivityDistributor.cpp',
    'nsHttpAuthCache.cpp',
    'nsHttpAuthManager.cpp',
    'nsHttpBasicAuth.cpp',
    'nsHttpChannel.cpp',
    'nsHttpChunkedDecoder.cpp',
    'nsHttpConnection.cpp',
    'nsHttpConnectionInfo.cpp',
    'nsHttpConnectionMgr.cpp',
    'nsHttpDigestAuth.cpp',
    'nsHttpHeaderArray.cpp',
    'nsHttpNTLMAuth.cpp',
    'nsHttpRequestHead.cpp',
    'nsHttpResponseHead.cpp',
    'nsHttpTransaction.cpp',
    'nsServerTiming.cpp',
    'NullHttpChannel.cpp',
    'NullHttpTransaction.cpp',
    'TunnelUtils.cpp',
]

# These files cannot be built in unified mode because of OS X headers.
SOURCES += [
    'nsHttpHandler.cpp',
]

IPDL_SOURCES += [
    'PAltDataOutputStream.ipdl',
    'PHttpBackgroundChannel.ipdl',
    'PHttpChannel.ipdl',
]

EXTRA_JS_MODULES += [
    'UserAgentOverrides.jsm',
    'UserAgentUpdates.jsm',
]

include('/ipc/chromium/chromium-config.mozbuild')

FINAL_LIBRARY = 'xul'

LOCAL_INCLUDES += [
    '/dom/base',
    '/netwerk/base',
    '/netwerk/cookie',
    '/security/pkix/include',
]

EXTRA_COMPONENTS += [
    'UAOverridesBootstrapper.js',
    'UAOverridesBootstrapper.manifest',
    'WellKnownOpportunisticUtils.js',
    'WellKnownOpportunisticUtils.manifest',
]

if CONFIG['OS_TARGET'] == 'Darwin':
    if not CONFIG['HOST_MAJOR_VERSION']:
        DEFINES.update(
            HAS_CONNECTX=True,
        )
    elif CONFIG['HOST_MAJOR_VERSION'] >= '15':
        DEFINES.update(
            HAS_CONNECTX=True,
        )