forked from chromiumembedded/java-cef
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCefRequestContext.java
More file actions
53 lines (45 loc) · 2.03 KB
/
CefRequestContext.java
File metadata and controls
53 lines (45 loc) · 2.03 KB
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
// Copyright (c) 2014 The Chromium Embedded Framework Authors. All rights
// reserved. Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE file.
package org.cef.browser;
import org.cef.handler.CefRequestContextHandler;
/**
* A request context provides request handling for a set of related browser
* objects. A request context is specified when creating a new browser object
* via the CefClient.createBrowser method. Browser objects with different
* request contexts will never be hosted in the same render process. Browser
* objects with the same request context may or may not be hosted in the same
* render process depending on the process model. Browser objects created
* indirectly via the JavaScript window.open function or targeted links will
* share the same render process and the same request context as the source
* browser. When running in single-process mode there is only a single render
* process (the main process) and so all browsers created in single-process mode
* will share the same request context. This will be the first request context
* passed into the CefClient.createBrowser method and all other request
* context objects will be ignored.
*/
public abstract class CefRequestContext {
// This CTOR can't be called directly. Call method create() instead.
CefRequestContext() {}
/**
* Returns the global context object.
*/
public static final CefRequestContext getGlobalContext() {
return CefRequestContext_N.getGlobalContextNative();
}
/**
* Creates a new context object with the specified handler.
*/
public static final CefRequestContext createContext(CefRequestContextHandler handler) {
return CefRequestContext_N.createNative(handler);
}
public abstract void dispose();
/**
* Returns true if this object is the global context.
*/
public abstract boolean isGlobal();
/**
* Returns the handler for this context if any.
*/
public abstract CefRequestContextHandler getHandler();
}