1# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
2# vim: set filetype=python:
3# This Source Code Form is subject to the terms of the Mozilla Public
4# License, v. 2.0. If a copy of the MPL was not distributed with this
5# file, You can obtain one at http://mozilla.org/MPL/2.0/.
6
7XPIDL_SOURCES += [
8    'nsIHangReport.idl',
9]
10
11XPIDL_MODULE = 'dom'
12
13EXPORTS.mozilla.dom.ipc += [
14    'BlobChild.h',
15    'BlobParent.h',
16    'IdType.h',
17    'nsIRemoteBlob.h',
18    'StructuredCloneData.h',
19]
20
21EXPORTS.mozilla.dom += [
22    'ContentBridgeChild.h',
23    'ContentBridgeParent.h',
24    'ContentChild.h',
25    'ContentParent.h',
26    'ContentProcess.h',
27    'ContentProcessManager.h',
28    'CPOWManagerGetter.h',
29    'CrashReporterChild.h',
30    'CrashReporterParent.h',
31    'FilePickerParent.h',
32    'nsIContentChild.h',
33    'nsIContentParent.h',
34    'PermissionMessageUtils.h',
35    'TabChild.h',
36    'TabContext.h',
37    'TabMessageUtils.h',
38    'TabParent.h',
39]
40
41EXPORTS.mozilla += [
42    'AppProcessChecker.h',
43    'PreallocatedProcessManager.h',
44    'ProcessHangMonitor.h',
45    'ProcessHangMonitorIPC.h',
46    'ProcessPriorityManager.h',
47]
48
49UNIFIED_SOURCES += [
50    'AppProcessChecker.cpp',
51    'ColorPickerParent.cpp',
52    'ContentBridgeChild.cpp',
53    'ContentBridgeParent.cpp',
54    'ContentParent.cpp',
55    'ContentProcess.cpp',
56    'ContentProcessManager.cpp',
57    'CrashReporterParent.cpp',
58    'DatePickerParent.cpp',
59    'FilePickerParent.cpp',
60    'nsIContentChild.cpp',
61    'nsIContentParent.cpp',
62    'PermissionMessageUtils.cpp',
63    'PreallocatedProcessManager.cpp',
64    'ProcessPriorityManager.cpp',
65    'ScreenManagerParent.cpp',
66    'StructuredCloneData.cpp',
67    'TabChild.cpp',
68    'TabContext.cpp',
69    'TabMessageUtils.cpp',
70    'TabParent.cpp',
71]
72
73# Blob.cpp cannot be compiled in unified mode because it triggers a fatal gcc warning.
74# CrashReporterChild.cpp cannot be compiled in unified mode because of name clashes
75# in OS X headers.
76# ContentChild.cpp cannot be compiled in unified mode on  linux due to Time conflict
77SOURCES += [
78    'Blob.cpp',
79    'ContentChild.cpp',
80    'CrashReporterChild.cpp',
81    'ProcessHangMonitor.cpp',
82]
83
84IPDL_SOURCES += [
85    'BlobTypes.ipdlh',
86    'DOMTypes.ipdlh',
87    'PBlob.ipdl',
88    'PBlobStream.ipdl',
89    'PBrowser.ipdl',
90    'PBrowserOrId.ipdlh',
91    'PColorPicker.ipdl',
92    'PContent.ipdl',
93    'PContentBridge.ipdl',
94    'PContentPermission.ipdlh',
95    'PContentPermissionRequest.ipdl',
96    'PCrashReporter.ipdl',
97    'PCycleCollectWithLogs.ipdl',
98    'PDatePicker.ipdl',
99    'PFilePicker.ipdl',
100    'PMemoryReportRequest.ipdl',
101    'PPluginWidget.ipdl',
102    'PProcessHangMonitor.ipdl',
103    'PScreenManager.ipdl',
104    'PTabContext.ipdlh',
105    'ServiceWorkerConfiguration.ipdlh',
106]
107
108include('/ipc/chromium/chromium-config.mozbuild')
109
110FINAL_LIBRARY = 'xul'
111
112if CONFIG['MOZ_SANDBOX'] and CONFIG['OS_TARGET'] == 'Darwin':
113    USE_LIBS += [
114        'mozsandbox',
115    ]
116
117if CONFIG['MOZ_CONTENT_SANDBOX'] and CONFIG['OS_ARCH'] == 'Linux':
118    USE_LIBS += [
119        'mozsandbox',
120    ]
121
122LOCAL_INCLUDES += [
123    '/caps',
124    '/chrome',
125    '/docshell/base',
126    '/dom/base',
127    '/dom/events',
128    '/dom/filesystem',
129    '/dom/geolocation',
130    '/dom/media/webspeech/synth/ipc',
131    '/dom/security',
132    '/dom/storage',
133    '/dom/workers',
134    '/embedding/components/printingui/ipc',
135    '/extensions/cookie',
136    '/extensions/spellcheck/src',
137    '/gfx/2d',
138    '/hal/sandbox',
139    '/layout/base',
140    '/media/webrtc',
141    '/netwerk/base',
142    '/toolkit/crashreporter',
143    '/toolkit/xre',
144    '/uriloader/exthandler',
145    '/widget',
146    '/xpcom/base',
147    '/xpcom/threads',
148]
149
150if CONFIG['MOZ_SANDBOX'] and CONFIG['OS_ARCH'] == 'WINNT':
151    LOCAL_INCLUDES += [
152        '/security/sandbox/chromium',
153        '/security/sandbox/chromium-shim',
154    ]
155
156if CONFIG['OS_ARCH'] != 'WINNT':
157    LOCAL_INCLUDES += [
158        '/modules/libjar',
159    ]
160
161DEFINES['BIN_SUFFIX'] = '"%s"' % CONFIG['BIN_SUFFIX']
162
163if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('android', 'gtk2', 'gonk'):
164    DEFINES['MOZ_ENABLE_FREETYPE'] = True
165
166if CONFIG['MOZ_TOOLKIT_SEARCH']:
167    DEFINES['MOZ_TOOLKIT_SEARCH'] = True
168
169JAR_MANIFESTS += ['jar.mn']
170
171BROWSER_CHROME_MANIFESTS += ['tests/browser.ini']
172MOCHITEST_CHROME_MANIFESTS += ['tests/chrome.ini']
173MOCHITEST_MANIFESTS += ['tests/mochitest.ini']
174
175CXXFLAGS += CONFIG['TK_CFLAGS']
176
177if CONFIG['GNU_CXX']:
178    CXXFLAGS += ['-Wno-error=shadow']
179