abstract class EngineSession : Observable<Observer>
(source)
Class representing a single engine session.
In browsers usually a session corresponds to a tab.
interface Observer
Interface to be implemented by classes that want to observe this engine session. |
|
class TrackingProtectionPolicy
Represents a tracking protection policy which is a combination of tracker categories that should be blocked. |
EngineSession(delegate: Observable<Observer> = ObserverRegistry())
Class representing a single engine session. |
abstract val settings: Settings
Provides access to the settings of this engine session. |
abstract fun captureThumbnail(): Bitmap?
Takes a screenshot of the actual tab |
|
abstract fun clearData(): Unit
Clears all user data sources available. |
|
abstract fun clearFindMatches(): Unit
Clears the highlighted results of previous calls to findAll / findNext. |
|
fun close(): Unit
Close the session. This may free underlying objects. Call this when you are finished using this session. |
|
abstract fun disableTrackingProtection(): Unit
Disables tracking protection for this engine session. |
|
abstract fun enableTrackingProtection(policy: TrackingProtectionPolicy = TrackingProtectionPolicy.all()): Unit
Enables tracking protection for this engine session. |
|
abstract fun exitFullScreenMode(): Unit
Exits fullscreen mode if currently in it that state. |
|
abstract fun findAll(text: String): Unit
Finds and highlights all occurrences of the provided String and highlights them asynchronously. |
|
abstract fun findNext(forward: Boolean): Unit
Finds and highlights the next or previous match found by findAll. |
|
abstract fun goBack(): Unit
Navigates back in the history of this session. |
|
abstract fun goForward(): Unit
Navigates forward in the history of this session. |
|
abstract fun loadData(data: String, mimeType: String = "text/html", encoding: String = "UTF-8"): Unit
Loads the data with the given mimeType. Example: |
|
abstract fun loadUrl(url: String): Unit
Loads the given URL. |
|
abstract fun reload(): Unit
Reloads the current URL. |
|
abstract fun restoreState(state: Map<String, Any>): Unit
Restores the engine state as provided by saveState. |
|
abstract fun saveState(): Map<String, Any>
Saves and returns the engine state. Engine implementations are not required to persist the state anywhere else than in the returned map. Engines that already provide a serialized state can use a single entry in this map to provide this state. The only requirement is that the same map can be used to restore the original state. See restoreState and the specific engine implementation for details. |
|
abstract fun stopLoading(): Unit
Stops loading the current session. |
|
abstract fun toggleDesktopMode(enable: Boolean, reload: Boolean = false): Unit
Enables/disables Desktop Mode with an optional ability to reload the session right after. |
class GeckoEngineSession : EngineSession
Gecko-based EngineSession implementation. |
|
class ServoEngineSession : EngineSession
Servo-based EngineSession implementation. |
|
class SystemEngineSession : EngineSession
WebView-based EngineSession implementation. |