Skip to content
This repository has been archived by the owner on Nov 1, 2022. It is now read-only.

Commit

Permalink
Issue #295 - Add empty implementations to observer interfaces of Sess…
Browse files Browse the repository at this point in the history
…ion and EngineView.
  • Loading branch information
pocmo authored and csadilek committed Jun 12, 2018
1 parent 75b7689 commit 791a6e7
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ class Session(
* Interface to be implemented by classes that want to observe a session.
*/
interface Observer {
fun onUrlChanged()
fun onProgress()
fun onLoadingStateChanged()
fun onNavigationStateChanged()
fun onSearch()
fun onSecurityChanged()
fun onCustomTabConfigChanged() { }
fun onUrlChanged() = Unit
fun onProgress() = Unit
fun onLoadingStateChanged() = Unit
fun onNavigationStateChanged() = Unit
fun onSearch() = Unit
fun onSecurityChanged() = Unit
fun onCustomTabConfigChanged() = Unit
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ abstract class EngineSession : Observable<EngineSession.Observer> by registry {
* Interface to be implemented by classes that want to observe this engine session.
*/
interface Observer {
fun onLocationChange(url: String)
fun onProgress(progress: Int)
fun onLoadingStateChange(loading: Boolean)
fun onNavigationStateChange(canGoBack: Boolean? = null, canGoForward: Boolean? = null)
fun onSecurityChange(secure: Boolean, host: String? = null, issuer: String? = null)
fun onLocationChange(url: String) = Unit
fun onProgress(progress: Int) = Unit
fun onLoadingStateChange(loading: Boolean) = Unit
fun onNavigationStateChange(canGoBack: Boolean? = null, canGoForward: Boolean? = null) = Unit
fun onSecurityChange(secure: Boolean, host: String? = null, issuer: String? = null) = Unit
}

/**
Expand Down

0 comments on commit 791a6e7

Please sign in to comment.