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

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

Issue 2123983003: PDF: Replace usage of i18nTemplate with Polymer data binding (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Tweak comment Created 4 years, 5 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
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 Polymer({ 5 Polymer({
6 is: 'viewer-error-screen', 6 is: 'viewer-error-screen',
7 properties: { 7 properties: {
8 reloadFn: { 8 reloadFn: {
9 type: Object, 9 type: Object,
10 value: null, 10 value: null,
11 observer: 'reloadFnChanged_' 11 observer: 'reloadFnChanged_'
12 } 12 },
13
14 strings: Object,
13 }, 15 },
14 16
15 reloadFnChanged_: function() { 17 reloadFnChanged_: function() {
16 // The default margins in paper-dialog don't work well with hiding/showing 18 // The default margins in paper-dialog don't work well with hiding/showing
17 // the .buttons div. We need to manually manage the bottom margin to get 19 // the .buttons div. We need to manually manage the bottom margin to get
18 // around this. 20 // around this.
19 if (this.reloadFn) 21 if (this.reloadFn)
20 this.$['load-failed-message'].classList.remove('last-item'); 22 this.$['load-failed-message'].classList.remove('last-item');
21 else 23 else
22 this.$['load-failed-message'].classList.add('last-item'); 24 this.$['load-failed-message'].classList.add('last-item');
23 }, 25 },
24 26
25 show: function() { 27 show: function() {
26 this.$.dialog.open(); 28 this.$.dialog.open();
27 }, 29 },
28 30
29 reload: function() { 31 reload: function() {
30 if (this.reloadFn) 32 if (this.reloadFn)
31 this.reloadFn(); 33 this.reloadFn();
32 } 34 }
33 }); 35 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698