mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Merge pull request #1623 from devoncarew/remove_service_extension
remove no longer needed code from the service protocol extensions
This commit is contained in:
commit
ac724d827d
@ -87,29 +87,13 @@ void initServiceExtensions() {
|
||||
_extensionsInitialized = true;
|
||||
|
||||
assert(() {
|
||||
developer.registerExtension('flutter', _flutter);
|
||||
developer.registerExtension('flutter.debugPaint', _debugPaint);
|
||||
developer.registerExtension('flutter.timeDilation', _timeDilation);
|
||||
|
||||
// Emit an info level log message; this tells the debugger that the Flutter
|
||||
// service extensions are registered.
|
||||
developer.log('Flutter initialized', name: 'flutter', level: 800);
|
||||
|
||||
return true;
|
||||
});
|
||||
}
|
||||
|
||||
/// Just respond to the request. Clients can use the existence of this call to
|
||||
/// know that the debug client is a Flutter app.
|
||||
Future<developer.ServiceExtensionResponse> _flutter(String method, Map<String, String> parameters) {
|
||||
return new Future<developer.ServiceExtensionResponse>.value(
|
||||
new developer.ServiceExtensionResponse.result(JSON.encode({
|
||||
'type': '_extensionType',
|
||||
'method': method
|
||||
}))
|
||||
);
|
||||
}
|
||||
|
||||
/// Toggle the [debugPaintSizeEnabled] setting.
|
||||
Future<developer.ServiceExtensionResponse> _debugPaint(String method, Map<String, String> parameters) {
|
||||
if (parameters.containsKey('enabled')) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user