@@ -42,11 +42,7 @@ class ChromeProxyService implements VmServiceInterface {
42
42
/// The actual chrome tab running this app.
43
43
final ChromeTab _tab;
44
44
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;
50
46
51
47
final AssetHandler _assetHandler;
52
48
@@ -61,9 +57,8 @@ class ChromeProxyService implements VmServiceInterface {
61
57
ChromeProxyService ._(
62
58
this ._vm,
63
59
this ._tab,
64
- this .tabConnection,
65
60
this ._assetHandler,
66
- this ._wipDebugger ,
61
+ this .wipDebugger ,
67
62
);
68
63
69
64
static Future <ChromeProxyService > create (
@@ -98,8 +93,7 @@ class ChromeProxyService implements VmServiceInterface {
98
93
..name = 'ChromeDebugProxy'
99
94
..startTime = DateTime .now ().millisecondsSinceEpoch
100
95
..version = Platform .version;
101
- var service = ChromeProxyService ._(
102
- vm, appTab, tabConnection, assetHandler, wipDebugger);
96
+ var service = ChromeProxyService ._(vm, appTab, assetHandler, wipDebugger);
103
97
await service._initialize ();
104
98
await service.createIsolate ();
105
99
return service;
@@ -108,7 +102,7 @@ class ChromeProxyService implements VmServiceInterface {
108
102
Future <Null > _initialize () async {
109
103
_debugger = await Debugger .create (
110
104
_assetHandler,
111
- tabConnection ,
105
+ wipDebugger.connection ,
112
106
_streamNotify,
113
107
_appInspectorProvider,
114
108
uri,
@@ -130,7 +124,7 @@ class ChromeProxyService implements VmServiceInterface {
130
124
}
131
125
132
126
_inspector = await AppInspector .initialize (
133
- _wipDebugger ,
127
+ wipDebugger ,
134
128
_assetHandler,
135
129
_debugger,
136
130
uri,
@@ -215,7 +209,7 @@ class ChromeProxyService implements VmServiceInterface {
215
209
require("dart_sdk").developer.invokeExtension(
216
210
"$method ", JSON.stringify(${jsonEncode (stringArgs )}));
217
211
''' ;
218
- var response = await _wipDebugger .sendCommand ('Runtime.evaluate' , params: {
212
+ var response = await wipDebugger .sendCommand ('Runtime.evaluate' , params: {
219
213
'expression' : expression,
220
214
'awaitPromise' : true ,
221
215
});
@@ -478,7 +472,7 @@ require("dart_sdk").developer.invokeExtension(
478
472
exceptionsSubscription? .cancel ();
479
473
}, onListen: () {
480
474
chromeConsoleSubscription =
481
- tabConnection .runtime.onConsoleAPICalled.listen ((e) {
475
+ wipDebugger.connection .runtime.onConsoleAPICalled.listen ((e) {
482
476
var isolate = _inspector? .isolate;
483
477
if (isolate == null ) return ;
484
478
if (! filter (e)) return ;
@@ -493,7 +487,7 @@ require("dart_sdk").developer.invokeExtension(
493
487
});
494
488
if (includeExceptions) {
495
489
exceptionsSubscription =
496
- tabConnection .runtime.onExceptionThrown.listen ((e) {
490
+ wipDebugger.connection .runtime.onExceptionThrown.listen ((e) {
497
491
var isolate = _inspector? .isolate;
498
492
if (isolate == null ) return ;
499
493
controller.add (Event ()
@@ -509,7 +503,7 @@ require("dart_sdk").developer.invokeExtension(
509
503
510
504
/// Listens for chrome console events and handles the ones we care about.
511
505
void _setUpChromeConsoleListeners (IsolateRef isolateRef) {
512
- _consoleSubscription = tabConnection .runtime.onConsoleAPICalled
506
+ _consoleSubscription = wipDebugger.connection .runtime.onConsoleAPICalled
513
507
.listen ((ConsoleAPIEvent event) {
514
508
var isolate = _inspector? .isolate;
515
509
if (isolate == null ) return ;
0 commit comments