@@ -64,9 +64,6 @@ cwc.ui.Runner = function(helper) {
64
64
/** @type {Element } */
65
65
this . nodeTerminal = null ;
66
66
67
- /** @type {Element } */
68
- this . nodeInfo = null ;
69
-
70
67
/** @type {Element } */
71
68
this . nodeOverlay = null ;
72
69
@@ -79,9 +76,6 @@ cwc.ui.Runner = function(helper) {
79
76
/** @type {Webview } */
80
77
this . content = null ;
81
78
82
- /** @type {function(Object, null=, Object<string, *>=):* } */
83
- this . infoTemplate = function ( ) { } ;
84
-
85
79
/** @type {function(Object, null=, Object<string, *>=):* } */
86
80
this . overlayTemplate = function ( ) { } ;
87
81
@@ -126,6 +120,9 @@ cwc.ui.Runner = function(helper) {
126
120
127
121
/** @private {!cwc.utils.Events} */
128
122
this . events_ = new cwc . utils . Events ( this . name ) ;
123
+
124
+ /** @private {!cwc.utils.Logger} */
125
+ this . log_ = new cwc . utils . Logger ( this . name ) ;
129
126
} ;
130
127
131
128
@@ -136,7 +133,7 @@ cwc.ui.Runner = function(helper) {
136
133
cwc . ui . Runner . prototype . decorate = function ( node ) {
137
134
this . node = node || goog . dom . getElement ( this . prefix + 'chrome' ) ;
138
135
if ( ! this . node ) {
139
- console . error ( 'Invalid Runner node:' , this . node ) ;
136
+ this . log_ . error ( 'Invalid Runner node:' , this . node ) ;
140
137
return ;
141
138
}
142
139
@@ -145,8 +142,6 @@ cwc.ui.Runner.prototype.decorate = function(node) {
145
142
toolbarPrefix : this . helper . getPrefix ( 'runner-toolbar' ) ,
146
143
} ) ;
147
144
148
- this . nodeInfo = goog . dom . getElement ( this . prefix + 'info' ) ;
149
-
150
145
// Runtime
151
146
this . nodeRuntime = goog . dom . getElement ( this . prefix + 'runtime' ) ;
152
147
@@ -167,13 +162,6 @@ cwc.ui.Runner.prototype.decorate = function(node) {
167
162
this . statusbar . decorate ( nodeStatusbar ) ;
168
163
}
169
164
170
- // Infobar
171
- let nodeInfobar = goog . dom . getElement ( this . prefix + 'infobar' ) ;
172
- if ( nodeInfobar ) {
173
- this . infobar = new cwc . ui . RunnerInfobar ( this . helper ) ;
174
- this . infobar . decorate ( nodeInfobar ) ;
175
- }
176
-
177
165
// Monitor
178
166
this . nodeMonitor = goog . dom . getElement ( this . prefix + 'monitor' ) ;
179
167
this . monitor = new cwc . ui . RunnerMonitor ( this . helper ) ;
@@ -193,14 +181,6 @@ cwc.ui.Runner.prototype.decorate = function(node) {
193
181
this . showOverlay ( this . overlayTemplate ? true : false ) ;
194
182
this . renderOverlayTemplate ( this . overlayTemplate ) ;
195
183
196
- // Info overlay
197
- let hasInfoTemplate = goog . isDefAndNotNull ( this . infoTemplate ) ;
198
- if ( this . toolbar ) {
199
- this . toolbar . enableInfoButton ( hasInfoTemplate ) ;
200
- }
201
- this . showInfo ( hasInfoTemplate ) ;
202
- this . renderInfoTemplate ( this . infoTemplate ) ;
203
-
204
184
// Runner
205
185
this . connector . init ( true ) ;
206
186
let layoutInstance = this . helper . getInstance ( 'layout' ) ;
@@ -213,15 +193,6 @@ cwc.ui.Runner.prototype.decorate = function(node) {
213
193
} ;
214
194
215
195
216
- /**
217
- * Sets the info template.
218
- * @param {!function(Object, null=, Object<string, *>=):* } template
219
- */
220
- cwc . ui . Runner . prototype . setInfoTemplate = function ( template ) {
221
- this . infoTemplate = template ;
222
- } ;
223
-
224
-
225
196
/**
226
197
* Sets the terminate template.
227
198
* @param {!function(Object, null=, Object<string, *>=):* } template
@@ -232,18 +203,7 @@ cwc.ui.Runner.prototype.setOverlayTemplate = function(template, prefix = '') {
232
203
this . overlayTemplate = template ;
233
204
this . overlayTemplatePrefix = prefix ;
234
205
} else {
235
- console . error ( 'None overlay template!' ) ;
236
- }
237
- } ;
238
-
239
-
240
- /**
241
- * Render the info template.
242
- * @param {function(Object, null=, Object<string, *>=):* } template
243
- */
244
- cwc . ui . Runner . prototype . renderInfoTemplate = function ( template ) {
245
- if ( this . nodeInfo && template ) {
246
- goog . soy . renderElement ( this . nodeInfo , template ) ;
206
+ this . log_ . error ( 'None overlay template!' ) ;
247
207
}
248
208
} ;
249
209
@@ -276,37 +236,6 @@ cwc.ui.Runner.prototype.setCleanUpFunction = function(func, scope) {
276
236
} ;
277
237
278
238
279
- /**
280
- * @param {boolean } visible
281
- */
282
- cwc . ui . Runner . prototype . showInfoButton = function ( visible ) {
283
- if ( this . toolbar ) {
284
- this . toolbar . showInfoButton ( visible ) ;
285
- }
286
- } ;
287
-
288
-
289
- /**
290
- * Toggles the info window.
291
- */
292
- cwc . ui . Runner . prototype . toggleInfo = function ( ) {
293
- if ( this . nodeInfo ) {
294
- this . showInfo ( ! goog . style . isElementShown ( this . nodeInfo ) ) ;
295
- }
296
- } ;
297
-
298
-
299
- /**
300
- * Shows / hides info window.
301
- * @param {boolean } visible
302
- */
303
- cwc . ui . Runner . prototype . showInfo = function ( visible ) {
304
- if ( this . nodeInfo ) {
305
- goog . style . setElementShown ( this . nodeInfo , visible ) ;
306
- }
307
- } ;
308
-
309
-
310
239
/**
311
240
* Shows / hides overlay window.
312
241
* @param {boolean } visible
@@ -410,15 +339,14 @@ cwc.ui.Runner.prototype.run = function() {
410
339
let rendererInstance = this . helper . getInstance ( 'renderer' , true ) ;
411
340
let contentUrl = rendererInstance . getContentUrl ( ) ;
412
341
if ( ! contentUrl ) {
413
- console . error ( 'Was not able to get content url!' ) ;
342
+ this . log_ . error ( 'Was not able to get content url!' ) ;
414
343
return ;
415
344
}
416
345
417
346
if ( this . infobar ) {
418
347
this . infobar . clear ( ) ;
419
348
}
420
349
421
- this . showInfo ( false ) ;
422
350
if ( this . content ) {
423
351
if ( this . status == cwc . ui . StatusbarState . LOADING ||
424
352
this . status == cwc . ui . StatusbarState . UNRESPONSIVE ) {
@@ -506,7 +434,7 @@ cwc.ui.Runner.prototype.terminate = function() {
506
434
*/
507
435
cwc . ui . Runner . prototype . remove = function ( ) {
508
436
if ( this . content ) {
509
- console . info ( 'Remove Runner...' ) ;
437
+ this . log_ . info ( 'Remove Runner...' ) ;
510
438
this . terminate ( ) ;
511
439
this . nodeRuntime . removeChild ( this . content ) ;
512
440
this . content = null ;
0 commit comments