@@ -64,9 +64,6 @@ cwc.ui.Runner = function(helper) {
6464 /** @type {Element } */
6565 this . nodeTerminal = null ;
6666
67- /** @type {Element } */
68- this . nodeInfo = null ;
69-
7067 /** @type {Element } */
7168 this . nodeOverlay = null ;
7269
@@ -79,9 +76,6 @@ cwc.ui.Runner = function(helper) {
7976 /** @type {Webview } */
8077 this . content = null ;
8178
82- /** @type {function(Object, null=, Object<string, *>=):* } */
83- this . infoTemplate = function ( ) { } ;
84-
8579 /** @type {function(Object, null=, Object<string, *>=):* } */
8680 this . overlayTemplate = function ( ) { } ;
8781
@@ -126,6 +120,9 @@ cwc.ui.Runner = function(helper) {
126120
127121 /** @private {!cwc.utils.Events} */
128122 this . events_ = new cwc . utils . Events ( this . name ) ;
123+
124+ /** @private {!cwc.utils.Logger} */
125+ this . log_ = new cwc . utils . Logger ( this . name ) ;
129126} ;
130127
131128
@@ -136,7 +133,7 @@ cwc.ui.Runner = function(helper) {
136133cwc . ui . Runner . prototype . decorate = function ( node ) {
137134 this . node = node || goog . dom . getElement ( this . prefix + 'chrome' ) ;
138135 if ( ! this . node ) {
139- console . error ( 'Invalid Runner node:' , this . node ) ;
136+ this . log_ . error ( 'Invalid Runner node:' , this . node ) ;
140137 return ;
141138 }
142139
@@ -145,8 +142,6 @@ cwc.ui.Runner.prototype.decorate = function(node) {
145142 toolbarPrefix : this . helper . getPrefix ( 'runner-toolbar' ) ,
146143 } ) ;
147144
148- this . nodeInfo = goog . dom . getElement ( this . prefix + 'info' ) ;
149-
150145 // Runtime
151146 this . nodeRuntime = goog . dom . getElement ( this . prefix + 'runtime' ) ;
152147
@@ -167,13 +162,6 @@ cwc.ui.Runner.prototype.decorate = function(node) {
167162 this . statusbar . decorate ( nodeStatusbar ) ;
168163 }
169164
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-
177165 // Monitor
178166 this . nodeMonitor = goog . dom . getElement ( this . prefix + 'monitor' ) ;
179167 this . monitor = new cwc . ui . RunnerMonitor ( this . helper ) ;
@@ -193,14 +181,6 @@ cwc.ui.Runner.prototype.decorate = function(node) {
193181 this . showOverlay ( this . overlayTemplate ? true : false ) ;
194182 this . renderOverlayTemplate ( this . overlayTemplate ) ;
195183
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-
204184 // Runner
205185 this . connector . init ( true ) ;
206186 let layoutInstance = this . helper . getInstance ( 'layout' ) ;
@@ -213,15 +193,6 @@ cwc.ui.Runner.prototype.decorate = function(node) {
213193} ;
214194
215195
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-
225196/**
226197 * Sets the terminate template.
227198 * @param {!function(Object, null=, Object<string, *>=):* } template
@@ -232,18 +203,7 @@ cwc.ui.Runner.prototype.setOverlayTemplate = function(template, prefix = '') {
232203 this . overlayTemplate = template ;
233204 this . overlayTemplatePrefix = prefix ;
234205 } 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!' ) ;
247207 }
248208} ;
249209
@@ -276,37 +236,6 @@ cwc.ui.Runner.prototype.setCleanUpFunction = function(func, scope) {
276236} ;
277237
278238
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-
310239/**
311240 * Shows / hides overlay window.
312241 * @param {boolean } visible
@@ -410,15 +339,14 @@ cwc.ui.Runner.prototype.run = function() {
410339 let rendererInstance = this . helper . getInstance ( 'renderer' , true ) ;
411340 let contentUrl = rendererInstance . getContentUrl ( ) ;
412341 if ( ! contentUrl ) {
413- console . error ( 'Was not able to get content url!' ) ;
342+ this . log_ . error ( 'Was not able to get content url!' ) ;
414343 return ;
415344 }
416345
417346 if ( this . infobar ) {
418347 this . infobar . clear ( ) ;
419348 }
420349
421- this . showInfo ( false ) ;
422350 if ( this . content ) {
423351 if ( this . status == cwc . ui . StatusbarState . LOADING ||
424352 this . status == cwc . ui . StatusbarState . UNRESPONSIVE ) {
@@ -506,7 +434,7 @@ cwc.ui.Runner.prototype.terminate = function() {
506434 */
507435cwc . ui . Runner . prototype . remove = function ( ) {
508436 if ( this . content ) {
509- console . info ( 'Remove Runner...' ) ;
437+ this . log_ . info ( 'Remove Runner...' ) ;
510438 this . terminate ( ) ;
511439 this . nodeRuntime . removeChild ( this . content ) ;
512440 this . content = null ;
0 commit comments