Update gen_keycodes templates (#146481)
1. Change chromium default branch from master (404) to main. 2. When I migrated the template to ARC is triggered a `-Wobjc-redundant-literal-use` error, so fix that. Engine PR is https://github.com/flutter/engine/pull/51981 3. Update to `FLUTTER_SHELL_PLATFORM_EMBEDDER_TEST_UTILS_KEY_CODES_G_H_` to match https://github.com/flutter/engine/pull/49006 This only updates the template and the script--I ran the script to validate it worked and built in the engine, but did not check in the actual generated key code changes (filed https://github.com/flutter/flutter/issues/146480 for that).
This commit is contained in:
@@ -26,14 +26,14 @@ import 'package:path/path.dart' as path;
|
||||
/// Get contents of the file that contains the physical key mapping in Chromium
|
||||
/// source.
|
||||
Future<String> getChromiumCodes() async {
|
||||
final Uri keyCodesUri = Uri.parse('https://chromium.googlesource.com/codesearch/chromium/src/+/refs/heads/master/ui/events/keycodes/dom/dom_code_data.inc?format=TEXT');
|
||||
final Uri keyCodesUri = Uri.parse('https://chromium.googlesource.com/codesearch/chromium/src/+/refs/heads/main/ui/events/keycodes/dom/dom_code_data.inc?format=TEXT');
|
||||
return utf8.decode(base64.decode(await http.read(keyCodesUri)));
|
||||
}
|
||||
|
||||
/// Get contents of the file that contains the logical key mapping in Chromium
|
||||
/// source.
|
||||
Future<String> getChromiumKeys() async {
|
||||
final Uri keyCodesUri = Uri.parse('https://chromium.googlesource.com/codesearch/chromium/src/+/refs/heads/master/ui/events/keycodes/dom/dom_key_data.inc?format=TEXT');
|
||||
final Uri keyCodesUri = Uri.parse('https://chromium.googlesource.com/codesearch/chromium/src/+/refs/heads/main/ui/events/keycodes/dom/dom_key_data.inc?format=TEXT');
|
||||
return utf8.decode(base64.decode(await http.read(keyCodesUri)));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user