@@ -42,11 +42,7 @@ class ChromeProxyService implements VmServiceInterface {
4242 /// The actual chrome tab running this app.
4343 final ChromeTab _tab;
4444
45- /// The connection with the chrome debug service for the tab.
46- // TODO(grouma) - This should be class private.
47- final WipConnection tabConnection;
48-
49- final WipDebugger _wipDebugger;
45+ final WipDebugger wipDebugger;
5046
5147 final AssetHandler _assetHandler;
5248
@@ -61,9 +57,8 @@ class ChromeProxyService implements VmServiceInterface {
6157 ChromeProxyService ._(
6258 this ._vm,
6359 this ._tab,
64- this .tabConnection,
6560 this ._assetHandler,
66- this ._wipDebugger ,
61+ this .wipDebugger ,
6762 );
6863
6964 static Future <ChromeProxyService > create (
@@ -98,8 +93,7 @@ class ChromeProxyService implements VmServiceInterface {
9893 ..name = 'ChromeDebugProxy'
9994 ..startTime = DateTime .now ().millisecondsSinceEpoch
10095 ..version = Platform .version;
101- var service = ChromeProxyService ._(
102- vm, appTab, tabConnection, assetHandler, wipDebugger);
96+ var service = ChromeProxyService ._(vm, appTab, assetHandler, wipDebugger);
10397 await service._initialize ();
10498 await service.createIsolate ();
10599 return service;
@@ -108,7 +102,7 @@ class ChromeProxyService implements VmServiceInterface {
108102 Future <Null > _initialize () async {
109103 _debugger = await Debugger .create (
110104 _assetHandler,
111- tabConnection ,
105+ wipDebugger.connection ,
112106 _streamNotify,
113107 _appInspectorProvider,
114108 uri,
@@ -130,7 +124,7 @@ class ChromeProxyService implements VmServiceInterface {
130124 }
131125
132126 _inspector = await AppInspector .initialize (
133- _wipDebugger ,
127+ wipDebugger ,
134128 _assetHandler,
135129 _debugger,
136130 uri,
@@ -215,7 +209,7 @@ class ChromeProxyService implements VmServiceInterface {
215209require("dart_sdk").developer.invokeExtension(
216210 "$method ", JSON.stringify(${jsonEncode (stringArgs )}));
217211''' ;
218- var response = await _wipDebugger .sendCommand ('Runtime.evaluate' , params: {
212+ var response = await wipDebugger .sendCommand ('Runtime.evaluate' , params: {
219213 'expression' : expression,
220214 'awaitPromise' : true ,
221215 });
@@ -478,7 +472,7 @@ require("dart_sdk").developer.invokeExtension(
478472 exceptionsSubscription? .cancel ();
479473 }, onListen: () {
480474 chromeConsoleSubscription =
481- tabConnection .runtime.onConsoleAPICalled.listen ((e) {
475+ wipDebugger.connection .runtime.onConsoleAPICalled.listen ((e) {
482476 var isolate = _inspector? .isolate;
483477 if (isolate == null ) return ;
484478 if (! filter (e)) return ;
@@ -493,7 +487,7 @@ require("dart_sdk").developer.invokeExtension(
493487 });
494488 if (includeExceptions) {
495489 exceptionsSubscription =
496- tabConnection .runtime.onExceptionThrown.listen ((e) {
490+ wipDebugger.connection .runtime.onExceptionThrown.listen ((e) {
497491 var isolate = _inspector? .isolate;
498492 if (isolate == null ) return ;
499493 controller.add (Event ()
@@ -509,7 +503,7 @@ require("dart_sdk").developer.invokeExtension(
509503
510504 /// Listens for chrome console events and handles the ones we care about.
511505 void _setUpChromeConsoleListeners (IsolateRef isolateRef) {
512- _consoleSubscription = tabConnection .runtime.onConsoleAPICalled
506+ _consoleSubscription = wipDebugger.connection .runtime.onConsoleAPICalled
513507 .listen ((ConsoleAPIEvent event) {
514508 var isolate = _inspector? .isolate;
515509 if (isolate == null ) return ;
0 commit comments