You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/webview_flutter/webview_flutter_android/android/src/main/java/io/flutter/plugins/webviewflutter/GeneratedAndroidWebView.java
+45Lines changed: 45 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -439,6 +439,51 @@ public interface Result<T> {
439
439
440
440
voiderror(Throwableerror);
441
441
}
442
+
/**
443
+
* Host API for managing the native `InstanceManager`.
444
+
*
445
+
* <p>Generated interface from Pigeon that represents a handler of messages from Flutter.
446
+
*/
447
+
publicinterfaceInstanceManagerHostApi {
448
+
/**
449
+
* Clear the native `InstanceManager`.
450
+
*
451
+
* <p>This is typically only used after a hot restart.
452
+
*/
453
+
voidclear();
454
+
455
+
/** The codec used by InstanceManagerHostApi. */
456
+
staticMessageCodec<Object> getCodec() {
457
+
returnnewStandardMessageCodec();
458
+
}
459
+
/**
460
+
* Sets up an instance of `InstanceManagerHostApi` to handle messages through the
Copy file name to clipboardExpand all lines: packages/webview_flutter/webview_flutter_android/android/src/main/java/io/flutter/plugins/webviewflutter/InstanceManager.java
+57-25Lines changed: 57 additions & 25 deletions
Original file line number
Diff line number
Diff line change
@@ -30,6 +30,9 @@
30
30
*/
31
31
@SuppressWarnings("unchecked")
32
32
publicclassInstanceManager {
33
+
/// Constant returned from #addHostCreatedInstance() if the manager is closed.
34
+
publicstaticfinalintINSTANCE_CLOSED = -1;
35
+
33
36
// Identifiers are locked to a specific range to avoid collisions with objects
34
37
// created simultaneously from Dart.
35
38
// Host uses identifiers >= 2^16 and Dart is expected to use values n where,
Copy file name to clipboardExpand all lines: packages/webview_flutter/webview_flutter_android/android/src/main/java/io/flutter/plugins/webviewflutter/WebViewFlutterPlugin.java
Copy file name to clipboardExpand all lines: packages/webview_flutter/webview_flutter_android/android/src/test/java/io/flutter/plugins/webviewflutter/InstanceManagerTest.java
+63Lines changed: 63 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -108,4 +108,67 @@ public void containsInstanceReturnsFalseWhenClosed() {
Copy file name to clipboardExpand all lines: packages/webview_flutter/webview_flutter_android/android/src/test/java/io/flutter/plugins/webviewflutter/WebViewClientTest.java
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -118,8 +118,8 @@ public WebViewClient createWebViewClient(WebViewClientFlutterApiImpl flutterApi)
Copy file name to clipboardExpand all lines: packages/webview_flutter/webview_flutter_android/android/src/test/java/io/flutter/plugins/webviewflutter/WebViewTest.java
0 commit comments