@@ -38,7 +38,7 @@ class AppInspector extends Domain {
3838 /// Map of [ScriptRef] id to containing [LibraryRef] id.
3939 final _scriptIdToLibraryId = < String , String > {};
4040
41- final WipConnection _tabConnection ;
41+ final WipDebugger _wipDebugger ;
4242 final AssetHandler _assetHandler;
4343 final Debugger _debugger;
4444 final Isolate isolate;
@@ -49,10 +49,10 @@ class AppInspector extends Domain {
4949
5050 AppInspector ._(
5151 this .isolate,
52- this ._tabConnection,
5352 this ._assetHandler,
5453 this ._debugger,
5554 this ._root,
55+ this ._wipDebugger,
5656 ) : isolateRef = _toIsolateRef (isolate),
5757 super .forInspector ();
5858
@@ -81,7 +81,7 @@ class AppInspector extends Domain {
8181 ..number = isolate.number;
8282
8383 static Future <AppInspector > initialize (
84- WipConnection tabConnection ,
84+ WipDebugger wipDebugger ,
8585 AssetHandler assetHandler,
8686 Debugger debugger,
8787 String root,
@@ -96,7 +96,7 @@ class AppInspector extends Domain {
9696 ..libraries = []
9797 ..extensionRPCs = [];
9898 var inspector =
99- AppInspector ._(isolate, tabConnection, assetHandler, debugger, root);
99+ AppInspector ._(isolate, assetHandler, debugger, root, wipDebugger );
100100 await inspector._initialize ();
101101 return inspector;
102102 }
@@ -123,7 +123,7 @@ class AppInspector extends Domain {
123123 return library.$expression ;
124124})();
125125 ''' ;
126- result = await _tabConnection.runtime .sendCommand ('Runtime.evaluate' ,
126+ result = await _wipDebugger .sendCommand ('Runtime.evaluate' ,
127127 params: {'expression' : evalExpression});
128128 handleErrorIfPresent (result,
129129 evalContents: evalExpression,
@@ -139,8 +139,8 @@ function($argsString) {
139139 return library.$expression ;
140140}
141141 ''' ;
142- result = await _tabConnection.runtime
143- .sendCommand ('Runtime.callFunctionOn' , params: {
142+ result =
143+ await _wipDebugger .sendCommand ('Runtime.callFunctionOn' , params: {
144144 'functionDeclaration' : evalExpression,
145145 'arguments' : arguments,
146146 // TODO(jakemac): Use the executionContext instead, or possibly the
@@ -265,7 +265,7 @@ function($argsString) {
265265 return result;
266266 })()
267267 ''' ;
268- var result = await _tabConnection.runtime .sendCommand ('Runtime.evaluate' ,
268+ var result = await _wipDebugger .sendCommand ('Runtime.evaluate' ,
269269 params: {'expression' : expression, 'returnByValue' : true });
270270 handleErrorIfPresent (result, evalContents: expression);
271271 var classDescriptors = (result.result['result' ]['value' ]['classes' ] as List )
@@ -405,8 +405,7 @@ function($argsString) {
405405 Future <List <LibraryRef >> _getLibraryRefs () async {
406406 if (_libraryRefs.isNotEmpty) return _libraryRefs.values.toList ();
407407 var expression = "require('dart_sdk').dart.getLibraries();" ;
408- var librariesResult = await _tabConnection.runtime.sendCommand (
409- 'Runtime.evaluate' ,
408+ var librariesResult = await _wipDebugger.sendCommand ('Runtime.evaluate' ,
410409 params: {'expression' : expression, 'returnByValue' : true });
411410 handleErrorIfPresent (librariesResult, evalContents: expression);
412411 var libraries =
@@ -424,8 +423,7 @@ function($argsString) {
424423 /// Runs an eval on the page to compute all existing registered extensions.
425424 Future <List <String >> _getExtensionRpcs () async {
426425 var expression = "require('dart_sdk').developer._extensions.keys.toList();" ;
427- var extensionsResult = await _tabConnection.runtime.sendCommand (
428- 'Runtime.evaluate' ,
426+ var extensionsResult = await _wipDebugger.sendCommand ('Runtime.evaluate' ,
429427 params: {'expression' : expression, 'returnByValue' : true });
430428 handleErrorIfPresent (extensionsResult, evalContents: expression);
431429 return List .from (extensionsResult.result['result' ]['value' ] as List );
0 commit comments