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

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

Issue 2617663002: WIP: run clang-format-js on lots of things (Closed)
Patch Set: merge Created 3 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
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: {type: Object, value: null, observer: 'reloadFnChanged_'},
9 type: Object,
10 value: null,
11 observer: 'reloadFnChanged_'
12 },
13 9
14 strings: Object, 10 strings: Object,
15 }, 11 },
16 12
17 reloadFnChanged_: function() { 13 reloadFnChanged_: function() {
18 // The default margins in paper-dialog don't work well with hiding/showing 14 // The default margins in paper-dialog don't work well with hiding/showing
19 // the .buttons div. We need to manually manage the bottom margin to get 15 // the .buttons div. We need to manually manage the bottom margin to get
20 // around this. 16 // around this.
21 if (this.reloadFn) 17 if (this.reloadFn)
22 this.$['load-failed-message'].classList.remove('last-item'); 18 this.$['load-failed-message'].classList.remove('last-item');
23 else 19 else
24 this.$['load-failed-message'].classList.add('last-item'); 20 this.$['load-failed-message'].classList.add('last-item');
25 }, 21 },
26 22
27 show: function() { 23 show: function() {
28 this.$.dialog.open(); 24 this.$.dialog.open();
29 }, 25 },
30 26
31 reload: function() { 27 reload: function() {
32 if (this.reloadFn) 28 if (this.reloadFn)
33 this.reloadFn(); 29 this.reloadFn();
34 } 30 }
35 }); 31 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698