   var monitor = new goog.labs.style.PixelDensityMonitor();
    monitor.start();

    var densityMap = goog.object.create(
        goog.labs.style.PixelDensityMonitor.Density.NORMAL, 'NORMAL',
        goog.labs.style.PixelDensityMonitor.Density.HIGH, 'HIGH');

    goog.events.listen(monitor,
        goog.labs.style.PixelDensityMonitor.EventType.CHANGE,
        function() {
          goog.log.info(logger, 'Density change: ' + densityMap[monitor.getDensity()]);
        });

    goog.log.info(logger, 'Starting