Source code

Revision control

Other Tools

1
/* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
2
*
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
7
#include "nsIChannel.idl"
8
9
/**
10
* The nsIProcessSwitchRequestor interface allows clients to instruct
11
* SessionStore.jsm that a channel setup has completed and a process switch
12
* may be required. This works alongside the on-may-change-process observer
13
* notification.
14
* This interface must be used only from the XPCOM main thread.
15
*/
16
[scriptable, uuid(fce8497b-c57c-4557-b360-3efefc83eff5)]
17
interface nsIProcessSwitchRequestor : nsISupports
18
{
19
/**
20
* The underlying channel object that was intercepted and that could trigger
21
* a process.
22
*/
23
readonly attribute nsIChannel channel;
24
25
/**
26
* Instructs the callee to be loaded in a new process. Like 'redirectTo'
27
* this can only be used on channels that have not yet called their
28
* listener's OnStartRequest(). Can only be called during the
29
* http-on-may-change-process observer notification.
30
*
31
* @param aTabPromise a promise which resolves to a nsIRemotTab object
32
* which the load will proceed in.
33
* @param aIdentifier a 64-bit ID which will be provided to the
34
* ChildProcessChannelListener.
35
*/
36
[must_use] void switchProcessTo(in Promise aTabPromise,
37
in unsigned long long aIdentifier);
38
39
/**
40
* Used to determine if there is a Cross-Origin-Opener-Policy mismatch
41
* that would require switching the channel to another process.
42
* @throws NS_ERROR_NOT_AVAILABLE if we don't have a responseHead
43
*/
44
[must_use] boolean hasCrossOriginOpenerPolicyMismatch();
45
46
/**
47
* Returns a cached CrossOriginOpenerPolicy that is computed just before we
48
* determine if there is a policy mismatch.
49
* @throws NS_ERROR_NOT_AVAILABLE if it has not been computed yet
50
*/
51
[must_use] readonly attribute nsILoadInfo_CrossOriginOpenerPolicy crossOriginOpenerPolicy;
52
};