Bug 1490724 - Define a stub `Callbacks.HistoryDelegate` instead of using default methods. r=snorp
authorLina Cambridge <lina@yakshaving.ninja>
Tue, 20 Nov 2018 22:43:58 +0000
changeset 503820 f21e2839396e3057ad8bf44bf473447196c5f9f0
parent 503819 50810256f2804f772899cfa1376e48124ab98eb6
child 503821 2e3fcb9d7d27befc37f3d77d86dcf78553a67c3f
push id10290
push userffxbld-merge
push dateMon, 03 Dec 2018 16:23:23 +0000
treeherdermozilla-beta@700bed2445e6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssnorp
bugs1490724
milestone65.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1490724 - Define a stub `Callbacks.HistoryDelegate` instead of using default methods. r=snorp Differential Revision: https://phabricator.services.mozilla.com/D12377
mobile/android/geckoview/src/androidTest/java/org/mozilla/geckoview/test/util/Callbacks.kt
--- a/mobile/android/geckoview/src/androidTest/java/org/mozilla/geckoview/test/util/Callbacks.kt
+++ b/mobile/android/geckoview/src/androidTest/java/org/mozilla/geckoview/test/util/Callbacks.kt
@@ -15,17 +15,17 @@ import org.mozilla.geckoview.WebRequestE
 
 import android.view.inputmethod.CursorAnchorInfo
 import android.view.inputmethod.ExtractedText
 import android.view.inputmethod.ExtractedTextRequest
 
 class Callbacks private constructor() {
     object Default : All
 
-    interface All : ContentDelegate, GeckoSession.HistoryDelegate, MediaDelegate,
+    interface All : ContentDelegate, HistoryDelegate, MediaDelegate,
                     NavigationDelegate, PermissionDelegate, ProgressDelegate,
                     PromptDelegate, ScrollDelegate, SelectionActionDelegate,
                     TextInputDelegate, TrackingProtectionDelegate
 
     interface ContentDelegate : GeckoSession.ContentDelegate {
         override fun onTitleChange(session: GeckoSession, title: String) {
         }
 
@@ -182,9 +182,21 @@ class Callbacks private constructor() {
 
     interface MediaDelegate: GeckoSession.MediaDelegate {
         override fun onMediaAdd(session: GeckoSession, element: MediaElement) {
         }
 
         override fun onMediaRemove(session: GeckoSession, element: MediaElement) {
         }
     }
+
+    interface HistoryDelegate : GeckoSession.HistoryDelegate {
+        override fun onVisited(session: GeckoSession, url: String, lastVisitedURL: String?,
+                               flags: Int): GeckoResult<Boolean>? {
+            return null
+        }
+
+        override fun getVisited(session: GeckoSession,
+                                urls: Array<out String>): GeckoResult<BooleanArray>? {
+            return null
+        }
+    }
 }