class ServoEngineSession : EngineSession
(source)
Servo-based EngineSession implementation.
ServoEngineSession(defaultSettings: Settings? = null)
Servo-based EngineSession implementation. |
val settings: Settings
Provides access to the settings of this engine session. |
fun captureThumbnail(): Bitmap?
Takes a screenshot of the actual tab |
|
fun clearData(): Unit
Clears all user data sources available. |
|
fun clearFindMatches(): Unit
Clears the highlighted results of previous calls to findAll / findNext. |
|
fun disableTrackingProtection(): Unit
Disables tracking protection for this engine session. |
|
fun enableTrackingProtection(policy: TrackingProtectionPolicy): Unit
Enables tracking protection for this engine session. |
|
fun exitFullScreenMode(): Unit
Exits fullscreen mode if currently in it that state. |
|
fun findAll(text: String): Unit
Finds and highlights all occurrences of the provided String and highlights them asynchronously. |
|
fun findNext(forward: Boolean): Unit
Finds and highlights the next or previous match found by findAll. |
|
fun goBack(): Unit
Navigates back in the history of this session. |
|
fun goForward(): Unit
Navigates forward in the history of this session. |
|
fun loadData(data: String, mimeType: String, encoding: String): Unit
Loads the data with the given mimeType. Example: |
|
fun loadUrl(url: String): Unit
Loads the given URL. |
|
fun reload(): Unit
Reloads the current URL. |
|
fun restoreState(state: Map<String, Any>): Unit
Restores the engine state as provided by saveState. |
|
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. |
|
fun stopLoading(): Unit
Stops loading the current session. |
|
fun toggleDesktopMode(enable: Boolean, reload: Boolean): Unit
Enables/disables Desktop Mode with an optional ability to reload the session right after. |
fun close(): Unit
Close the session. This may free underlying objects. Call this when you are finished using this session. |