1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
14 observer
: 'imgChanged'
19 observer
: 'latchableChanged'
25 var mql
= window
.matchMedia('(-webkit-min-device-pixel-ratio: 1.3');
26 dpi
= mql
.matches
? 'hi' : 'low';
30 imgChanged: function() {
32 this.$.icon
.style
.backgroundImage
=
33 'url(' + this.getAttribute('assetpath') + 'img/' + dpi
+
34 'DPI/' + this.img
+ ')';
36 this.$.icon
.style
.backgroundImage
= '';
40 latchableChanged: function() {
42 this.classList
.add('latchable');
44 this.classList
.remove('latchable');