|
|
|
@@ -1,4 +1,4 @@
|
|
|
|
|
// Autogenerated from Pigeon (v22.3.0), do not edit directly.
|
|
|
|
|
// Autogenerated from Pigeon (v22.4.2), do not edit directly.
|
|
|
|
|
// See also: https://pub.dev/packages/pigeon
|
|
|
|
|
// ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, prefer_null_aware_operators, omit_local_variable_types, unused_shown_name, unnecessary_import, no_leading_underscores_for_local_identifiers
|
|
|
|
|
|
|
|
|
@@ -955,6 +955,37 @@ class TabContentState {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
class FindResultState {
|
|
|
|
|
FindResultState({
|
|
|
|
|
required this.activeMatchOrdinal,
|
|
|
|
|
required this.numberOfMatches,
|
|
|
|
|
required this.isDoneCounting,
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
int activeMatchOrdinal;
|
|
|
|
|
|
|
|
|
|
int numberOfMatches;
|
|
|
|
|
|
|
|
|
|
bool isDoneCounting;
|
|
|
|
|
|
|
|
|
|
Object encode() {
|
|
|
|
|
return <Object?>[
|
|
|
|
|
activeMatchOrdinal,
|
|
|
|
|
numberOfMatches,
|
|
|
|
|
isDoneCounting,
|
|
|
|
|
];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static FindResultState decode(Object result) {
|
|
|
|
|
result as List<Object?>;
|
|
|
|
|
return FindResultState(
|
|
|
|
|
activeMatchOrdinal: result[0]! as int,
|
|
|
|
|
numberOfMatches: result[1]! as int,
|
|
|
|
|
isDoneCounting: result[2]! as bool,
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class _PigeonCodec extends StandardMessageCodec {
|
|
|
|
|
const _PigeonCodec();
|
|
|
|
@@ -1044,6 +1075,9 @@ class _PigeonCodec extends StandardMessageCodec {
|
|
|
|
|
} else if (value is TabContentState) {
|
|
|
|
|
buffer.putUint8(155);
|
|
|
|
|
writeValue(buffer, value.encode());
|
|
|
|
|
} else if (value is FindResultState) {
|
|
|
|
|
buffer.putUint8(156);
|
|
|
|
|
writeValue(buffer, value.encode());
|
|
|
|
|
} else {
|
|
|
|
|
super.writeValue(buffer, value);
|
|
|
|
|
}
|
|
|
|
@@ -1111,6 +1145,8 @@ class _PigeonCodec extends StandardMessageCodec {
|
|
|
|
|
return SecurityInfoState.decode(readValue(buffer)!);
|
|
|
|
|
case 155:
|
|
|
|
|
return TabContentState.decode(readValue(buffer)!);
|
|
|
|
|
case 156:
|
|
|
|
|
return FindResultState.decode(readValue(buffer)!);
|
|
|
|
|
default:
|
|
|
|
|
return super.readValueOfType(type, buffer);
|
|
|
|
|
}
|
|
|
|
@@ -1153,6 +1189,42 @@ class GeckoBrowserApi {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
class GeckoEngineSettingsApi {
|
|
|
|
|
/// Constructor for [GeckoEngineSettingsApi]. The [binaryMessenger] named argument is
|
|
|
|
|
/// available for dependency injection. If it is left null, the default
|
|
|
|
|
/// BinaryMessenger will be used which routes to the host platform.
|
|
|
|
|
GeckoEngineSettingsApi({BinaryMessenger? binaryMessenger, String messageChannelSuffix = ''})
|
|
|
|
|
: pigeonVar_binaryMessenger = binaryMessenger,
|
|
|
|
|
pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : '';
|
|
|
|
|
final BinaryMessenger? pigeonVar_binaryMessenger;
|
|
|
|
|
|
|
|
|
|
static const MessageCodec<Object?> pigeonChannelCodec = _PigeonCodec();
|
|
|
|
|
|
|
|
|
|
final String pigeonVar_messageChannelSuffix;
|
|
|
|
|
|
|
|
|
|
Future<void> javaScriptEnabled(bool state) async {
|
|
|
|
|
final String pigeonVar_channelName = 'dev.flutter.pigeon.flutter_mozilla_components.GeckoEngineSettingsApi.javaScriptEnabled$pigeonVar_messageChannelSuffix';
|
|
|
|
|
final BasicMessageChannel<Object?> pigeonVar_channel = BasicMessageChannel<Object?>(
|
|
|
|
|
pigeonVar_channelName,
|
|
|
|
|
pigeonChannelCodec,
|
|
|
|
|
binaryMessenger: pigeonVar_binaryMessenger,
|
|
|
|
|
);
|
|
|
|
|
final List<Object?>? pigeonVar_replyList =
|
|
|
|
|
await pigeonVar_channel.send(<Object?>[state]) as List<Object?>?;
|
|
|
|
|
if (pigeonVar_replyList == null) {
|
|
|
|
|
throw _createConnectionError(pigeonVar_channelName);
|
|
|
|
|
} else if (pigeonVar_replyList.length > 1) {
|
|
|
|
|
throw PlatformException(
|
|
|
|
|
code: pigeonVar_replyList[0]! as String,
|
|
|
|
|
message: pigeonVar_replyList[1] as String?,
|
|
|
|
|
details: pigeonVar_replyList[2],
|
|
|
|
|
);
|
|
|
|
|
} else {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
class GeckoSessionApi {
|
|
|
|
|
/// Constructor for [GeckoSessionApi]. The [binaryMessenger] named argument is
|
|
|
|
|
/// available for dependency injection. If it is left null, the default
|
|
|
|
@@ -1166,7 +1238,7 @@ class GeckoSessionApi {
|
|
|
|
|
|
|
|
|
|
final String pigeonVar_messageChannelSuffix;
|
|
|
|
|
|
|
|
|
|
Future<void> loadUrl({required String? tabId, required String url, required LoadUrlFlagsValue flags, required Map<String?, String?>? additionalHeaders,}) async {
|
|
|
|
|
Future<void> loadUrl({required String? tabId, required String url, required LoadUrlFlagsValue flags, required Map<String, String>? additionalHeaders,}) async {
|
|
|
|
|
final String pigeonVar_channelName = 'dev.flutter.pigeon.flutter_mozilla_components.GeckoSessionApi.loadUrl$pigeonVar_messageChannelSuffix';
|
|
|
|
|
final BasicMessageChannel<Object?> pigeonVar_channel = BasicMessageChannel<Object?>(
|
|
|
|
|
pigeonVar_channelName,
|
|
|
|
@@ -1452,7 +1524,7 @@ class GeckoSessionApi {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Future<void> crashRecovery({required List<String?>? tabIds}) async {
|
|
|
|
|
Future<void> crashRecovery({required List<String>? tabIds}) async {
|
|
|
|
|
final String pigeonVar_channelName = 'dev.flutter.pigeon.flutter_mozilla_components.GeckoSessionApi.crashRecovery$pigeonVar_messageChannelSuffix';
|
|
|
|
|
final BasicMessageChannel<Object?> pigeonVar_channel = BasicMessageChannel<Object?>(
|
|
|
|
|
pigeonVar_channelName,
|
|
|
|
@@ -1576,7 +1648,7 @@ class GeckoTabsApi {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Future<String> addTab({required String url, required bool selectTab, required bool startLoading, required String? parentId, required LoadUrlFlagsValue flags, required String? contextId, required SourceValue source, required bool private, required HistoryMetadataKey? historyMetadata, required Map<String?, String?>? additionalHeaders,}) async {
|
|
|
|
|
Future<String> addTab({required String url, required bool selectTab, required bool startLoading, required String? parentId, required LoadUrlFlagsValue flags, required String? contextId, required SourceValue source, required bool private, required HistoryMetadataKey? historyMetadata, required Map<String, String>? additionalHeaders,}) async {
|
|
|
|
|
final String pigeonVar_channelName = 'dev.flutter.pigeon.flutter_mozilla_components.GeckoTabsApi.addTab$pigeonVar_messageChannelSuffix';
|
|
|
|
|
final BasicMessageChannel<Object?> pigeonVar_channel = BasicMessageChannel<Object?>(
|
|
|
|
|
pigeonVar_channelName,
|
|
|
|
@@ -1625,7 +1697,7 @@ class GeckoTabsApi {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Future<void> removeTabs({required List<String?> ids}) async {
|
|
|
|
|
Future<void> removeTabs({required List<String> ids}) async {
|
|
|
|
|
final String pigeonVar_channelName = 'dev.flutter.pigeon.flutter_mozilla_components.GeckoTabsApi.removeTabs$pigeonVar_messageChannelSuffix';
|
|
|
|
|
final BasicMessageChannel<Object?> pigeonVar_channel = BasicMessageChannel<Object?>(
|
|
|
|
|
pigeonVar_channelName,
|
|
|
|
@@ -1713,7 +1785,7 @@ class GeckoTabsApi {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Future<void> restoreTabsByList({required List<RecoverableTab?> tabs, required String? selectTabId, required RestoreLocation restoreLocation,}) async {
|
|
|
|
|
Future<void> restoreTabsByList({required List<RecoverableTab> tabs, required String? selectTabId, required RestoreLocation restoreLocation,}) async {
|
|
|
|
|
final String pigeonVar_channelName = 'dev.flutter.pigeon.flutter_mozilla_components.GeckoTabsApi.restoreTabsByList$pigeonVar_messageChannelSuffix';
|
|
|
|
|
final BasicMessageChannel<Object?> pigeonVar_channel = BasicMessageChannel<Object?>(
|
|
|
|
|
pigeonVar_channelName,
|
|
|
|
@@ -1841,7 +1913,7 @@ class GeckoTabsApi {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Future<void> moveTabs({required List<String?> tabIds, required String targetTabId, required bool placeAfter,}) async {
|
|
|
|
|
Future<void> moveTabs({required List<String> tabIds, required String targetTabId, required bool placeAfter,}) async {
|
|
|
|
|
final String pigeonVar_channelName = 'dev.flutter.pigeon.flutter_mozilla_components.GeckoTabsApi.moveTabs$pigeonVar_messageChannelSuffix';
|
|
|
|
|
final BasicMessageChannel<Object?> pigeonVar_channel = BasicMessageChannel<Object?>(
|
|
|
|
|
pigeonVar_channelName,
|
|
|
|
@@ -1891,6 +1963,86 @@ class GeckoTabsApi {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
class GeckoFindApi {
|
|
|
|
|
/// Constructor for [GeckoFindApi]. The [binaryMessenger] named argument is
|
|
|
|
|
/// available for dependency injection. If it is left null, the default
|
|
|
|
|
/// BinaryMessenger will be used which routes to the host platform.
|
|
|
|
|
GeckoFindApi({BinaryMessenger? binaryMessenger, String messageChannelSuffix = ''})
|
|
|
|
|
: pigeonVar_binaryMessenger = binaryMessenger,
|
|
|
|
|
pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : '';
|
|
|
|
|
final BinaryMessenger? pigeonVar_binaryMessenger;
|
|
|
|
|
|
|
|
|
|
static const MessageCodec<Object?> pigeonChannelCodec = _PigeonCodec();
|
|
|
|
|
|
|
|
|
|
final String pigeonVar_messageChannelSuffix;
|
|
|
|
|
|
|
|
|
|
Future<void> findAll(String? tabId, String text) async {
|
|
|
|
|
final String pigeonVar_channelName = 'dev.flutter.pigeon.flutter_mozilla_components.GeckoFindApi.findAll$pigeonVar_messageChannelSuffix';
|
|
|
|
|
final BasicMessageChannel<Object?> pigeonVar_channel = BasicMessageChannel<Object?>(
|
|
|
|
|
pigeonVar_channelName,
|
|
|
|
|
pigeonChannelCodec,
|
|
|
|
|
binaryMessenger: pigeonVar_binaryMessenger,
|
|
|
|
|
);
|
|
|
|
|
final List<Object?>? pigeonVar_replyList =
|
|
|
|
|
await pigeonVar_channel.send(<Object?>[tabId, text]) as List<Object?>?;
|
|
|
|
|
if (pigeonVar_replyList == null) {
|
|
|
|
|
throw _createConnectionError(pigeonVar_channelName);
|
|
|
|
|
} else if (pigeonVar_replyList.length > 1) {
|
|
|
|
|
throw PlatformException(
|
|
|
|
|
code: pigeonVar_replyList[0]! as String,
|
|
|
|
|
message: pigeonVar_replyList[1] as String?,
|
|
|
|
|
details: pigeonVar_replyList[2],
|
|
|
|
|
);
|
|
|
|
|
} else {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Future<void> findNext(String? tabId, bool forward) async {
|
|
|
|
|
final String pigeonVar_channelName = 'dev.flutter.pigeon.flutter_mozilla_components.GeckoFindApi.findNext$pigeonVar_messageChannelSuffix';
|
|
|
|
|
final BasicMessageChannel<Object?> pigeonVar_channel = BasicMessageChannel<Object?>(
|
|
|
|
|
pigeonVar_channelName,
|
|
|
|
|
pigeonChannelCodec,
|
|
|
|
|
binaryMessenger: pigeonVar_binaryMessenger,
|
|
|
|
|
);
|
|
|
|
|
final List<Object?>? pigeonVar_replyList =
|
|
|
|
|
await pigeonVar_channel.send(<Object?>[tabId, forward]) as List<Object?>?;
|
|
|
|
|
if (pigeonVar_replyList == null) {
|
|
|
|
|
throw _createConnectionError(pigeonVar_channelName);
|
|
|
|
|
} else if (pigeonVar_replyList.length > 1) {
|
|
|
|
|
throw PlatformException(
|
|
|
|
|
code: pigeonVar_replyList[0]! as String,
|
|
|
|
|
message: pigeonVar_replyList[1] as String?,
|
|
|
|
|
details: pigeonVar_replyList[2],
|
|
|
|
|
);
|
|
|
|
|
} else {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Future<void> clearMatches(String? tabId) async {
|
|
|
|
|
final String pigeonVar_channelName = 'dev.flutter.pigeon.flutter_mozilla_components.GeckoFindApi.clearMatches$pigeonVar_messageChannelSuffix';
|
|
|
|
|
final BasicMessageChannel<Object?> pigeonVar_channel = BasicMessageChannel<Object?>(
|
|
|
|
|
pigeonVar_channelName,
|
|
|
|
|
pigeonChannelCodec,
|
|
|
|
|
binaryMessenger: pigeonVar_binaryMessenger,
|
|
|
|
|
);
|
|
|
|
|
final List<Object?>? pigeonVar_replyList =
|
|
|
|
|
await pigeonVar_channel.send(<Object?>[tabId]) as List<Object?>?;
|
|
|
|
|
if (pigeonVar_replyList == null) {
|
|
|
|
|
throw _createConnectionError(pigeonVar_channelName);
|
|
|
|
|
} else if (pigeonVar_replyList.length > 1) {
|
|
|
|
|
throw PlatformException(
|
|
|
|
|
code: pigeonVar_replyList[0]! as String,
|
|
|
|
|
message: pigeonVar_replyList[1] as String?,
|
|
|
|
|
details: pigeonVar_replyList[2],
|
|
|
|
|
);
|
|
|
|
|
} else {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
class GeckoIconsApi {
|
|
|
|
|
/// Constructor for [GeckoIconsApi]. The [binaryMessenger] named argument is
|
|
|
|
|
/// available for dependency injection. If it is left null, the default
|
|
|
|
@@ -1972,7 +2124,7 @@ class GeckoCookieApi {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Future<List<Cookie?>> getAllCookies(String? domain, String? firstPartyDomain, String? name, CookiePartitionKey? partitionKey, String? storeId, String url) async {
|
|
|
|
|
Future<List<Cookie>> getAllCookies(String? domain, String? firstPartyDomain, String? name, CookiePartitionKey? partitionKey, String? storeId, String url) async {
|
|
|
|
|
final String pigeonVar_channelName = 'dev.flutter.pigeon.flutter_mozilla_components.GeckoCookieApi.getAllCookies$pigeonVar_messageChannelSuffix';
|
|
|
|
|
final BasicMessageChannel<Object?> pigeonVar_channel = BasicMessageChannel<Object?>(
|
|
|
|
|
pigeonVar_channelName,
|
|
|
|
@@ -1995,7 +2147,7 @@ class GeckoCookieApi {
|
|
|
|
|
message: 'Host platform returned null value for non-null return value.',
|
|
|
|
|
);
|
|
|
|
|
} else {
|
|
|
|
|
return (pigeonVar_replyList[0] as List<Object?>?)!.cast<Cookie?>();
|
|
|
|
|
return (pigeonVar_replyList[0] as List<Object?>?)!.cast<Cookie>();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@@ -2047,7 +2199,7 @@ class GeckoCookieApi {
|
|
|
|
|
abstract class GeckoStateEvents {
|
|
|
|
|
static const MessageCodec<Object?> pigeonChannelCodec = _PigeonCodec();
|
|
|
|
|
|
|
|
|
|
void onTabListChange(List<String?> tabIds);
|
|
|
|
|
void onTabListChange(List<String> tabIds);
|
|
|
|
|
|
|
|
|
|
void onSelectedTabChange(String? id);
|
|
|
|
|
|
|
|
|
@@ -2063,6 +2215,8 @@ abstract class GeckoStateEvents {
|
|
|
|
|
|
|
|
|
|
void onThumbnailChange(String id, Uint8List? bytes);
|
|
|
|
|
|
|
|
|
|
void onFindResults(String id, List<FindResultState> results);
|
|
|
|
|
|
|
|
|
|
static void setUp(GeckoStateEvents? api, {BinaryMessenger? binaryMessenger, String messageChannelSuffix = '',}) {
|
|
|
|
|
messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : '';
|
|
|
|
|
{
|
|
|
|
@@ -2076,9 +2230,9 @@ abstract class GeckoStateEvents {
|
|
|
|
|
assert(message != null,
|
|
|
|
|
'Argument for dev.flutter.pigeon.flutter_mozilla_components.GeckoStateEvents.onTabListChange was null.');
|
|
|
|
|
final List<Object?> args = (message as List<Object?>?)!;
|
|
|
|
|
final List<String?>? arg_tabIds = (args[0] as List<Object?>?)?.cast<String?>();
|
|
|
|
|
final List<String>? arg_tabIds = (args[0] as List<Object?>?)?.cast<String>();
|
|
|
|
|
assert(arg_tabIds != null,
|
|
|
|
|
'Argument for dev.flutter.pigeon.flutter_mozilla_components.GeckoStateEvents.onTabListChange was null, expected non-null List<String?>.');
|
|
|
|
|
'Argument for dev.flutter.pigeon.flutter_mozilla_components.GeckoStateEvents.onTabListChange was null, expected non-null List<String>.');
|
|
|
|
|
try {
|
|
|
|
|
api.onTabListChange(arg_tabIds!);
|
|
|
|
|
return wrapResponse(empty: true);
|
|
|
|
@@ -2274,5 +2428,313 @@ abstract class GeckoStateEvents {
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
final BasicMessageChannel<Object?> pigeonVar_channel = BasicMessageChannel<Object?>(
|
|
|
|
|
'dev.flutter.pigeon.flutter_mozilla_components.GeckoStateEvents.onFindResults$messageChannelSuffix', pigeonChannelCodec,
|
|
|
|
|
binaryMessenger: binaryMessenger);
|
|
|
|
|
if (api == null) {
|
|
|
|
|
pigeonVar_channel.setMessageHandler(null);
|
|
|
|
|
} else {
|
|
|
|
|
pigeonVar_channel.setMessageHandler((Object? message) async {
|
|
|
|
|
assert(message != null,
|
|
|
|
|
'Argument for dev.flutter.pigeon.flutter_mozilla_components.GeckoStateEvents.onFindResults was null.');
|
|
|
|
|
final List<Object?> args = (message as List<Object?>?)!;
|
|
|
|
|
final String? arg_id = (args[0] as String?);
|
|
|
|
|
assert(arg_id != null,
|
|
|
|
|
'Argument for dev.flutter.pigeon.flutter_mozilla_components.GeckoStateEvents.onFindResults was null, expected non-null String.');
|
|
|
|
|
final List<FindResultState>? arg_results = (args[1] as List<Object?>?)?.cast<FindResultState>();
|
|
|
|
|
assert(arg_results != null,
|
|
|
|
|
'Argument for dev.flutter.pigeon.flutter_mozilla_components.GeckoStateEvents.onFindResults was null, expected non-null List<FindResultState>.');
|
|
|
|
|
try {
|
|
|
|
|
api.onFindResults(arg_id!, arg_results!);
|
|
|
|
|
return wrapResponse(empty: true);
|
|
|
|
|
} on PlatformException catch (e) {
|
|
|
|
|
return wrapResponse(error: e);
|
|
|
|
|
} catch (e) {
|
|
|
|
|
return wrapResponse(error: PlatformException(code: 'error', message: e.toString()));
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
class ReaderViewEvents {
|
|
|
|
|
/// Constructor for [ReaderViewEvents]. The [binaryMessenger] named argument is
|
|
|
|
|
/// available for dependency injection. If it is left null, the default
|
|
|
|
|
/// BinaryMessenger will be used which routes to the host platform.
|
|
|
|
|
ReaderViewEvents({BinaryMessenger? binaryMessenger, String messageChannelSuffix = ''})
|
|
|
|
|
: pigeonVar_binaryMessenger = binaryMessenger,
|
|
|
|
|
pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : '';
|
|
|
|
|
final BinaryMessenger? pigeonVar_binaryMessenger;
|
|
|
|
|
|
|
|
|
|
static const MessageCodec<Object?> pigeonChannelCodec = _PigeonCodec();
|
|
|
|
|
|
|
|
|
|
final String pigeonVar_messageChannelSuffix;
|
|
|
|
|
|
|
|
|
|
Future<void> onToggleReaderView(bool enable) async {
|
|
|
|
|
final String pigeonVar_channelName = 'dev.flutter.pigeon.flutter_mozilla_components.ReaderViewEvents.onToggleReaderView$pigeonVar_messageChannelSuffix';
|
|
|
|
|
final BasicMessageChannel<Object?> pigeonVar_channel = BasicMessageChannel<Object?>(
|
|
|
|
|
pigeonVar_channelName,
|
|
|
|
|
pigeonChannelCodec,
|
|
|
|
|
binaryMessenger: pigeonVar_binaryMessenger,
|
|
|
|
|
);
|
|
|
|
|
final List<Object?>? pigeonVar_replyList =
|
|
|
|
|
await pigeonVar_channel.send(<Object?>[enable]) as List<Object?>?;
|
|
|
|
|
if (pigeonVar_replyList == null) {
|
|
|
|
|
throw _createConnectionError(pigeonVar_channelName);
|
|
|
|
|
} else if (pigeonVar_replyList.length > 1) {
|
|
|
|
|
throw PlatformException(
|
|
|
|
|
code: pigeonVar_replyList[0]! as String,
|
|
|
|
|
message: pigeonVar_replyList[1] as String?,
|
|
|
|
|
details: pigeonVar_replyList[2],
|
|
|
|
|
);
|
|
|
|
|
} else {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Future<void> onAppearanceButtonTap() async {
|
|
|
|
|
final String pigeonVar_channelName = 'dev.flutter.pigeon.flutter_mozilla_components.ReaderViewEvents.onAppearanceButtonTap$pigeonVar_messageChannelSuffix';
|
|
|
|
|
final BasicMessageChannel<Object?> pigeonVar_channel = BasicMessageChannel<Object?>(
|
|
|
|
|
pigeonVar_channelName,
|
|
|
|
|
pigeonChannelCodec,
|
|
|
|
|
binaryMessenger: pigeonVar_binaryMessenger,
|
|
|
|
|
);
|
|
|
|
|
final List<Object?>? pigeonVar_replyList =
|
|
|
|
|
await pigeonVar_channel.send(null) as List<Object?>?;
|
|
|
|
|
if (pigeonVar_replyList == null) {
|
|
|
|
|
throw _createConnectionError(pigeonVar_channelName);
|
|
|
|
|
} else if (pigeonVar_replyList.length > 1) {
|
|
|
|
|
throw PlatformException(
|
|
|
|
|
code: pigeonVar_replyList[0]! as String,
|
|
|
|
|
message: pigeonVar_replyList[1] as String?,
|
|
|
|
|
details: pigeonVar_replyList[2],
|
|
|
|
|
);
|
|
|
|
|
} else {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
abstract class ReaderViewController {
|
|
|
|
|
static const MessageCodec<Object?> pigeonChannelCodec = _PigeonCodec();
|
|
|
|
|
|
|
|
|
|
void appearanceButtonVisibility(bool visible);
|
|
|
|
|
|
|
|
|
|
void readerViewButtonVisibility(bool visible);
|
|
|
|
|
|
|
|
|
|
static void setUp(ReaderViewController? api, {BinaryMessenger? binaryMessenger, String messageChannelSuffix = '',}) {
|
|
|
|
|
messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : '';
|
|
|
|
|
{
|
|
|
|
|
final BasicMessageChannel<Object?> pigeonVar_channel = BasicMessageChannel<Object?>(
|
|
|
|
|
'dev.flutter.pigeon.flutter_mozilla_components.ReaderViewController.appearanceButtonVisibility$messageChannelSuffix', pigeonChannelCodec,
|
|
|
|
|
binaryMessenger: binaryMessenger);
|
|
|
|
|
if (api == null) {
|
|
|
|
|
pigeonVar_channel.setMessageHandler(null);
|
|
|
|
|
} else {
|
|
|
|
|
pigeonVar_channel.setMessageHandler((Object? message) async {
|
|
|
|
|
assert(message != null,
|
|
|
|
|
'Argument for dev.flutter.pigeon.flutter_mozilla_components.ReaderViewController.appearanceButtonVisibility was null.');
|
|
|
|
|
final List<Object?> args = (message as List<Object?>?)!;
|
|
|
|
|
final bool? arg_visible = (args[0] as bool?);
|
|
|
|
|
assert(arg_visible != null,
|
|
|
|
|
'Argument for dev.flutter.pigeon.flutter_mozilla_components.ReaderViewController.appearanceButtonVisibility was null, expected non-null bool.');
|
|
|
|
|
try {
|
|
|
|
|
api.appearanceButtonVisibility(arg_visible!);
|
|
|
|
|
return wrapResponse(empty: true);
|
|
|
|
|
} on PlatformException catch (e) {
|
|
|
|
|
return wrapResponse(error: e);
|
|
|
|
|
} catch (e) {
|
|
|
|
|
return wrapResponse(error: PlatformException(code: 'error', message: e.toString()));
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
final BasicMessageChannel<Object?> pigeonVar_channel = BasicMessageChannel<Object?>(
|
|
|
|
|
'dev.flutter.pigeon.flutter_mozilla_components.ReaderViewController.readerViewButtonVisibility$messageChannelSuffix', pigeonChannelCodec,
|
|
|
|
|
binaryMessenger: binaryMessenger);
|
|
|
|
|
if (api == null) {
|
|
|
|
|
pigeonVar_channel.setMessageHandler(null);
|
|
|
|
|
} else {
|
|
|
|
|
pigeonVar_channel.setMessageHandler((Object? message) async {
|
|
|
|
|
assert(message != null,
|
|
|
|
|
'Argument for dev.flutter.pigeon.flutter_mozilla_components.ReaderViewController.readerViewButtonVisibility was null.');
|
|
|
|
|
final List<Object?> args = (message as List<Object?>?)!;
|
|
|
|
|
final bool? arg_visible = (args[0] as bool?);
|
|
|
|
|
assert(arg_visible != null,
|
|
|
|
|
'Argument for dev.flutter.pigeon.flutter_mozilla_components.ReaderViewController.readerViewButtonVisibility was null, expected non-null bool.');
|
|
|
|
|
try {
|
|
|
|
|
api.readerViewButtonVisibility(arg_visible!);
|
|
|
|
|
return wrapResponse(empty: true);
|
|
|
|
|
} on PlatformException catch (e) {
|
|
|
|
|
return wrapResponse(error: e);
|
|
|
|
|
} catch (e) {
|
|
|
|
|
return wrapResponse(error: PlatformException(code: 'error', message: e.toString()));
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
abstract class SelectionAction {
|
|
|
|
|
static const MessageCodec<Object?> pigeonChannelCodec = _PigeonCodec();
|
|
|
|
|
|
|
|
|
|
/// Gets Strings representing all possible selection actions.
|
|
|
|
|
///
|
|
|
|
|
/// @returns String IDs for each action that could possibly be shown in the context menu. This
|
|
|
|
|
/// array must include all actions, available or not, and must not change over the class lifetime.
|
|
|
|
|
List<String> getAllActions();
|
|
|
|
|
|
|
|
|
|
/// Checks if an action can be shown on a new selection context menu.
|
|
|
|
|
///
|
|
|
|
|
/// @returns whether or not the the custom action with the id of [id] is currently available
|
|
|
|
|
/// which may be informed by [selectedText].
|
|
|
|
|
bool isActionAvailable(String id, String selectedText);
|
|
|
|
|
|
|
|
|
|
/// Gets a title to be shown in the selection context menu.
|
|
|
|
|
///
|
|
|
|
|
/// @returns the text that should be shown on the action.
|
|
|
|
|
String? getActionTitle(String id);
|
|
|
|
|
|
|
|
|
|
/// Should perform the action with the id of [id].
|
|
|
|
|
///
|
|
|
|
|
/// @returns [true] if the action was consumed.
|
|
|
|
|
bool performAction(String id, String selectedText);
|
|
|
|
|
|
|
|
|
|
/// Takes in a list of actions and sorts them.
|
|
|
|
|
///
|
|
|
|
|
/// @returns the sorted list.
|
|
|
|
|
List<String> sortedActions(List<String> actions);
|
|
|
|
|
|
|
|
|
|
static void setUp(SelectionAction? api, {BinaryMessenger? binaryMessenger, String messageChannelSuffix = '',}) {
|
|
|
|
|
messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : '';
|
|
|
|
|
{
|
|
|
|
|
final BasicMessageChannel<Object?> pigeonVar_channel = BasicMessageChannel<Object?>(
|
|
|
|
|
'dev.flutter.pigeon.flutter_mozilla_components.SelectionAction.getAllActions$messageChannelSuffix', pigeonChannelCodec,
|
|
|
|
|
binaryMessenger: binaryMessenger);
|
|
|
|
|
if (api == null) {
|
|
|
|
|
pigeonVar_channel.setMessageHandler(null);
|
|
|
|
|
} else {
|
|
|
|
|
pigeonVar_channel.setMessageHandler((Object? message) async {
|
|
|
|
|
try {
|
|
|
|
|
final List<String> output = api.getAllActions();
|
|
|
|
|
return wrapResponse(result: output);
|
|
|
|
|
} on PlatformException catch (e) {
|
|
|
|
|
return wrapResponse(error: e);
|
|
|
|
|
} catch (e) {
|
|
|
|
|
return wrapResponse(error: PlatformException(code: 'error', message: e.toString()));
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
final BasicMessageChannel<Object?> pigeonVar_channel = BasicMessageChannel<Object?>(
|
|
|
|
|
'dev.flutter.pigeon.flutter_mozilla_components.SelectionAction.isActionAvailable$messageChannelSuffix', pigeonChannelCodec,
|
|
|
|
|
binaryMessenger: binaryMessenger);
|
|
|
|
|
if (api == null) {
|
|
|
|
|
pigeonVar_channel.setMessageHandler(null);
|
|
|
|
|
} else {
|
|
|
|
|
pigeonVar_channel.setMessageHandler((Object? message) async {
|
|
|
|
|
assert(message != null,
|
|
|
|
|
'Argument for dev.flutter.pigeon.flutter_mozilla_components.SelectionAction.isActionAvailable was null.');
|
|
|
|
|
final List<Object?> args = (message as List<Object?>?)!;
|
|
|
|
|
final String? arg_id = (args[0] as String?);
|
|
|
|
|
assert(arg_id != null,
|
|
|
|
|
'Argument for dev.flutter.pigeon.flutter_mozilla_components.SelectionAction.isActionAvailable was null, expected non-null String.');
|
|
|
|
|
final String? arg_selectedText = (args[1] as String?);
|
|
|
|
|
assert(arg_selectedText != null,
|
|
|
|
|
'Argument for dev.flutter.pigeon.flutter_mozilla_components.SelectionAction.isActionAvailable was null, expected non-null String.');
|
|
|
|
|
try {
|
|
|
|
|
final bool output = api.isActionAvailable(arg_id!, arg_selectedText!);
|
|
|
|
|
return wrapResponse(result: output);
|
|
|
|
|
} on PlatformException catch (e) {
|
|
|
|
|
return wrapResponse(error: e);
|
|
|
|
|
} catch (e) {
|
|
|
|
|
return wrapResponse(error: PlatformException(code: 'error', message: e.toString()));
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
final BasicMessageChannel<Object?> pigeonVar_channel = BasicMessageChannel<Object?>(
|
|
|
|
|
'dev.flutter.pigeon.flutter_mozilla_components.SelectionAction.getActionTitle$messageChannelSuffix', pigeonChannelCodec,
|
|
|
|
|
binaryMessenger: binaryMessenger);
|
|
|
|
|
if (api == null) {
|
|
|
|
|
pigeonVar_channel.setMessageHandler(null);
|
|
|
|
|
} else {
|
|
|
|
|
pigeonVar_channel.setMessageHandler((Object? message) async {
|
|
|
|
|
assert(message != null,
|
|
|
|
|
'Argument for dev.flutter.pigeon.flutter_mozilla_components.SelectionAction.getActionTitle was null.');
|
|
|
|
|
final List<Object?> args = (message as List<Object?>?)!;
|
|
|
|
|
final String? arg_id = (args[0] as String?);
|
|
|
|
|
assert(arg_id != null,
|
|
|
|
|
'Argument for dev.flutter.pigeon.flutter_mozilla_components.SelectionAction.getActionTitle was null, expected non-null String.');
|
|
|
|
|
try {
|
|
|
|
|
final String? output = api.getActionTitle(arg_id!);
|
|
|
|
|
return wrapResponse(result: output);
|
|
|
|
|
} on PlatformException catch (e) {
|
|
|
|
|
return wrapResponse(error: e);
|
|
|
|
|
} catch (e) {
|
|
|
|
|
return wrapResponse(error: PlatformException(code: 'error', message: e.toString()));
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
final BasicMessageChannel<Object?> pigeonVar_channel = BasicMessageChannel<Object?>(
|
|
|
|
|
'dev.flutter.pigeon.flutter_mozilla_components.SelectionAction.performAction$messageChannelSuffix', pigeonChannelCodec,
|
|
|
|
|
binaryMessenger: binaryMessenger);
|
|
|
|
|
if (api == null) {
|
|
|
|
|
pigeonVar_channel.setMessageHandler(null);
|
|
|
|
|
} else {
|
|
|
|
|
pigeonVar_channel.setMessageHandler((Object? message) async {
|
|
|
|
|
assert(message != null,
|
|
|
|
|
'Argument for dev.flutter.pigeon.flutter_mozilla_components.SelectionAction.performAction was null.');
|
|
|
|
|
final List<Object?> args = (message as List<Object?>?)!;
|
|
|
|
|
final String? arg_id = (args[0] as String?);
|
|
|
|
|
assert(arg_id != null,
|
|
|
|
|
'Argument for dev.flutter.pigeon.flutter_mozilla_components.SelectionAction.performAction was null, expected non-null String.');
|
|
|
|
|
final String? arg_selectedText = (args[1] as String?);
|
|
|
|
|
assert(arg_selectedText != null,
|
|
|
|
|
'Argument for dev.flutter.pigeon.flutter_mozilla_components.SelectionAction.performAction was null, expected non-null String.');
|
|
|
|
|
try {
|
|
|
|
|
final bool output = api.performAction(arg_id!, arg_selectedText!);
|
|
|
|
|
return wrapResponse(result: output);
|
|
|
|
|
} on PlatformException catch (e) {
|
|
|
|
|
return wrapResponse(error: e);
|
|
|
|
|
} catch (e) {
|
|
|
|
|
return wrapResponse(error: PlatformException(code: 'error', message: e.toString()));
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
final BasicMessageChannel<Object?> pigeonVar_channel = BasicMessageChannel<Object?>(
|
|
|
|
|
'dev.flutter.pigeon.flutter_mozilla_components.SelectionAction.sortedActions$messageChannelSuffix', pigeonChannelCodec,
|
|
|
|
|
binaryMessenger: binaryMessenger);
|
|
|
|
|
if (api == null) {
|
|
|
|
|
pigeonVar_channel.setMessageHandler(null);
|
|
|
|
|
} else {
|
|
|
|
|
pigeonVar_channel.setMessageHandler((Object? message) async {
|
|
|
|
|
assert(message != null,
|
|
|
|
|
'Argument for dev.flutter.pigeon.flutter_mozilla_components.SelectionAction.sortedActions was null.');
|
|
|
|
|
final List<Object?> args = (message as List<Object?>?)!;
|
|
|
|
|
final List<String>? arg_actions = (args[0] as List<Object?>?)?.cast<String>();
|
|
|
|
|
assert(arg_actions != null,
|
|
|
|
|
'Argument for dev.flutter.pigeon.flutter_mozilla_components.SelectionAction.sortedActions was null, expected non-null List<String>.');
|
|
|
|
|
try {
|
|
|
|
|
final List<String> output = api.sortedActions(arg_actions!);
|
|
|
|
|
return wrapResponse(result: output);
|
|
|
|
|
} on PlatformException catch (e) {
|
|
|
|
|
return wrapResponse(error: e);
|
|
|
|
|
} catch (e) {
|
|
|
|
|
return wrapResponse(error: PlatformException(code: 'error', message: e.toString()));
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|