summaryrefslogtreecommitdiffstats
path: root/docshell/build/components.conf
blob: 9817f14f646ec76fb293ef3765477355199ebcf3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
# -*- 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/.

about_pages = [
    'about',
    'addons',
    'buildconfig',
    'certificate',
    'checkerboard',
    'config',
    'crashcontent',
    'crashparent',
    'crashgpu',
    'credits',
    'httpsonlyerror',
    'license',
    'logging',
    'logo',
    'memory',
    'mozilla',
    'neterror',
    'networking',
    'performance',
    'plugins',
    'processes',
    'serviceworkers',
    'srcdoc',
    'support',
    'telemetry',
    'translations',
    'url-classifier',
    'webrtc',
]

if defined('MOZ_CRASHREPORTER'):
    about_pages.append('crashes')
if buildconfig.substs['MOZ_WIDGET_TOOLKIT'] != 'android':
    about_pages.append('profiles')
if buildconfig.substs['MOZ_WIDGET_TOOLKIT'] == 'windows':
    about_pages.append('third-party')
    about_pages.append('windows-messages')
if not defined('MOZ_GLEAN_ANDROID'):
    about_pages.append('glean')

Headers = ['/docshell/build/nsDocShellModule.h']

InitFunc = 'mozilla::InitDocShellModule'
UnloadFunc = 'mozilla::UnloadDocShellModule'

Classes = [
    {
        'name': 'DocLoader',
        'cid': '{057b04d0-0ccf-11d2-beba-00805f8a66dc}',
        'contract_ids': ['@mozilla.org/docloaderservice;1'],
        'type': 'nsDocLoader',
        'headers': ['nsDocLoader.h'],
        'init_method': 'Init',
    },
    {
        'name': 'URIFixup',
        'js_name': 'uriFixup',
        'cid': '{c6cf88b7-452e-47eb-bdc9-86e3561648ef}',
        'contract_ids': ['@mozilla.org/docshell/uri-fixup;1'],
        'interfaces': ['nsIURIFixup'],
        'esModule': 'resource://gre/modules/URIFixup.sys.mjs',
        'singleton': True,
        'constructor': 'URIFixup',
    },
    {
        'cid': '{33d75835-722f-42c0-89cc-44f328e56a86}',
        'contract_ids': ['@mozilla.org/docshell/uri-fixup-info;1'],
        'esModule': 'resource://gre/modules/URIFixup.sys.mjs',
        'constructor': 'URIFixupInfo',
    },
    {
        'cid': '{56ebedd4-6ccf-48e8-bdae-adc77f044567}',
        'contract_ids': [
            '@mozilla.org/network/protocol/about;1?what=%s' % path
            for path in about_pages
        ],
        'legacy_constructor': 'nsAboutRedirector::Create',
        'headers': ['/docshell/base/nsAboutRedirector.h'],
    },
    {
        'name': 'ExternalProtocolHandler',
        'cid': '{bd6390c8-fbea-11d4-98f6-001083010e9b}',
        'contract_ids': ['@mozilla.org/network/protocol;1?name=default'],
        'type': 'nsExternalProtocolHandler',
        'headers': ['/uriloader/exthandler/nsExternalProtocolHandler.h'],
        'protocol_config': {
            'scheme': 'default',
            'flags': [
                'URI_NORELATIVE',
                'URI_NOAUTH',
                'URI_LOADABLE_BY_ANYONE',
                'URI_NON_PERSISTABLE',
                'URI_DOES_NOT_RETURN_DATA',
            ],
            'default_port': 0,
        },
        'processes': ProcessSelector.ALLOW_IN_SOCKET_PROCESS,
    },
    {
        'cid': '{95790842-75a0-430d-98bf-f5ce3788ea6d}',
        'contract_ids': ['@mozilla.org/ospermissionrequest;1'],
        'type': 'nsOSPermissionRequest',
        'headers': ['nsOSPermissionRequest.h'],
        'processes': ProcessSelector.MAIN_PROCESS_ONLY,
    },
    {
        'name': 'Prefetch',
        'cid': '{6b8bdffc-3394-417d-be83-a81b7c0f63bf}',
        'contract_ids': ['@mozilla.org/prefetch-service;1'],
        'type': 'nsPrefetchService',
        'headers': ['/uriloader/prefetch/nsPrefetchService.h'],
        'init_method': 'Init',
    },
    {
        'cid': '{c4b6fb7c-bfb1-49dc-a65f-035796524b53}',
        'contract_ids': ['@mozilla.org/uriloader/handler-service;1'],
        'type': 'nsIHandlerService',
        'headers': ['ContentHandlerService.h'],
        'constructor': 'mozilla::dom::ContentHandlerService::Create',
    },
    {
        'cid': '{bc0017e3-2438-47be-a567-41db58f17627}',
        'contract_ids': ['@mozilla.org/uriloader/local-handler-app;1'],
        'type': 'PlatformLocalHandlerApp_t',
        'headers': ['/uriloader/exthandler/nsLocalHandlerApp.h'],
    },
    {
        'name': 'URILoader',
        'cid': '{9f6d5d40-90e7-11d3-af80-00a024ffc08c}',
        'contract_ids': ['@mozilla.org/uriloader;1'],
        'type': 'nsURILoader',
        'headers': ['nsURILoader.h'],
    },
    {
        'cid': '{f30bc0a2-958b-4287-bf62-ce38ba0c811e}',
        'contract_ids': ['@mozilla.org/webnavigation-info;1'],
        'type': 'nsWebNavigationInfo',
        'headers': ['/docshell/base/nsWebNavigationInfo.h'],
    },
]

if defined('MOZ_ENABLE_DBUS'):
    Classes += [
        {
            'name': 'DBusHandlerApp',
            'cid': '{6c3c274b-4cbf-4bb5-a635-05ad2cbb6535}',
            'contract_ids': ['@mozilla.org/uriloader/dbus-handler-app;1'],
            'type': 'nsDBusHandlerApp',
            'headers': ['/uriloader/exthandler/nsDBusHandlerApp.h'],
        },
    ]

if buildconfig.substs['MOZ_WIDGET_TOOLKIT'] == 'android':
    Classes += [
        # Android has its own externel-helper-app-service, so we omit
        # that here for nsExternalHelperAppService.
        {
            'cid': '{a7f800e0-4306-11d4-98d0-001083010e9b}',
            'contract_ids': [
                '@mozilla.org/mime;1',
                '@mozilla.org/uriloader/external-protocol-service;1',
            ],
            'type': 'nsExternalHelperAppService',
            'constructor': 'nsExternalHelperAppService::GetSingleton',
            'headers': ['nsExternalHelperAppService.h'],
            'init_method': 'Init',
            'processes': ProcessSelector.ALLOW_IN_SOCKET_PROCESS,
        },
    ]
else:
    Classes += [
        {
            'cid': '{a7f800e0-4306-11d4-98d0-001083010e9b}',
            'contract_ids': [
                '@mozilla.org/mime;1',
                '@mozilla.org/uriloader/external-helper-app-service;1',
                '@mozilla.org/uriloader/external-protocol-service;1',
            ],
            'type': 'nsExternalHelperAppService',
            'constructor': 'nsExternalHelperAppService::GetSingleton',
            'headers': ['nsExternalHelperAppService.h'],
            'init_method': 'Init',
            'processes': ProcessSelector.ALLOW_IN_SOCKET_PROCESS,
        },
    ]