public abstract class CefRequestContext
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
abstract boolean |
canSetPreference(java.lang.String name)
Returns true if the preference with the specified |name| can be modified
using setPreference.
|
static CefRequestContext |
createContext(CefRequestContextHandler handler)
Creates a new context object with the specified handler.
|
abstract void |
dispose() |
abstract java.util.Map<java.lang.String,java.lang.Object> |
getAllPreferences(boolean includeDefaults)
Returns all preferences as a dictionary.
|
static CefRequestContext |
getGlobalContext()
Returns the global context object.
|
abstract CefRequestContextHandler |
getHandler()
Returns the handler for this context if any.
|
abstract java.lang.Object |
getPreference(java.lang.String name)
Returns the value for the preference with the specified |name|.
|
abstract boolean |
hasPreference(java.lang.String name)
Returns true if a preference with the specified |name| exists.
|
abstract boolean |
isGlobal()
Returns true if this object is the global context.
|
abstract java.lang.String |
setPreference(java.lang.String name,
java.lang.Object value)
Set the |value| associated with preference |name|.
|
public abstract boolean canSetPreference(java.lang.String name)
public static final CefRequestContext createContext(CefRequestContextHandler handler)
public abstract void dispose()
public abstract java.util.Map<java.lang.String,java.lang.Object> getAllPreferences(boolean includeDefaults)
public static final CefRequestContext getGlobalContext()
public abstract CefRequestContextHandler getHandler()
public abstract java.lang.Object getPreference(java.lang.String name)
public abstract boolean hasPreference(java.lang.String name)
This method must be called on the browser process UI thread, otherwise it will always return false. It is easiest to ensure the correct calling thread by using a callback method invoked by the browser process UI thread, such as CefLifeSpanHandler.onAfterCreated(CefBrowser), to configure the preferences.
public abstract boolean isGlobal()
public abstract java.lang.String setPreference(java.lang.String name,
java.lang.Object value)