Chromium Code Reviews| Index: chrome/browser/resources/pdf/elements/viewer-pdf-toolbar/viewer-pdf-toolbar.js |
| diff --git a/chrome/browser/resources/pdf/elements/viewer-pdf-toolbar/viewer-pdf-toolbar.js b/chrome/browser/resources/pdf/elements/viewer-pdf-toolbar/viewer-pdf-toolbar.js |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..4b8c4d4035ccc9ef9237737070b80b44858570fe |
| --- /dev/null |
| +++ b/chrome/browser/resources/pdf/elements/viewer-pdf-toolbar/viewer-pdf-toolbar.js |
| @@ -0,0 +1,44 @@ |
| +// Copyright 2015 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +Polymer('viewer-pdf-toolbar', { |
| + |
|
raymes
2015/02/04 00:54:25
nit remove the blank line
Alexandre Carlton
2015/02/04 04:28:46
Done.
|
| + /** |
| + * @type {string} |
| + * The filename of the PDF document. |
| + */ |
| + filename: '', |
|
raymes
2015/02/04 00:54:25
nit: we can add blank lines after each of the vari
Alexandre Carlton
2015/02/04 04:28:46
Done.
|
| + /** |
| + * @type {number} |
| + * The current index of the page being viewed (0-based). |
| + */ |
| + pageIndex: 0, |
| + /** |
| + * @type {number} |
| + * The current loading progress of the PDF document (0 - 100). |
| + */ |
| + loadProgress: 0, |
| + /** |
| + * @type {number} |
| + * The number of pages in the PDF document. |
| + */ |
| + docLength: 1, |
| + |
| + loadProgressChanged: function() { |
| + if (this.loadProgress >= 100) |
| + this.$.pageselector.style.visibility = 'visible'; |
| + }, |
| + |
| + toggleBookmarks: function() { |
| + this.fire('toggle-bookmarks'); |
| + }, |
| + |
| + save: function() { |
| + this.fire('save'); |
| + }, |
| + |
| + print: function() { |
| + this.fire('print'); |
| + } |
| +}); |