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

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

Issue 898673003: Refactor Material Design PDF Viewer toolbar into a single element (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Improve variable naming and documentation Created 5 years, 10 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 2015 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 Polymer('viewer-pdf-toolbar', {
6
raymes 2015/02/04 00:54:25 nit remove the blank line
Alexandre Carlton 2015/02/04 04:28:46 Done.
7 /**
8 * @type {string}
9 * The filename of the PDF document.
10 */
11 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.
12 /**
13 * @type {number}
14 * The current index of the page being viewed (0-based).
15 */
16 pageIndex: 0,
17 /**
18 * @type {number}
19 * The current loading progress of the PDF document (0 - 100).
20 */
21 loadProgress: 0,
22 /**
23 * @type {number}
24 * The number of pages in the PDF document.
25 */
26 docLength: 1,
27
28 loadProgressChanged: function() {
29 if (this.loadProgress >= 100)
30 this.$.pageselector.style.visibility = 'visible';
31 },
32
33 toggleBookmarks: function() {
34 this.fire('toggle-bookmarks');
35 },
36
37 save: function() {
38 this.fire('save');
39 },
40
41 print: function() {
42 this.fire('print');
43 }
44 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698