Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(64)

Side by Side Diff: chrome/browser/resources/pdf/elements/viewer-button/viewer-button.js

Issue 853603002: Merge html-office-public repo into src (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
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.
4
5 (function() {
6 var dpi = '';
7
8 Polymer('viewer-button', {
9 img: '',
10 latchable: false,
11 ready: function() {
12 if (!dpi) {
13 var mql = window.matchMedia('(-webkit-min-device-pixel-ratio: 1.3');
14 dpi = mql.matches ? 'hi' : 'low';
15 }
16 },
17 imgChanged: function() {
18 if (this.img) {
19 this.$.icon.style.backgroundImage =
20 'url(' + this.getAttribute('assetpath') + 'img/' + dpi +
21 'DPI/' + this.img + ')';
22 } else {
23 this.$.icon.style.backgroundImage = '';
24 }
25 },
26 latchableChanged: function() {
27 if (this.latchable)
28 this.classList.add('latchable');
29 else
30 this.classList.remove('latchable');
31 },
32 });
33 })();
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698