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

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: Rebase from master 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 /**
7 * @type {string}
8 * The title of the PDF document.
9 */
10 docTitle: '',
11
12 /**
13 * @type {number}
14 * The current index of the page being viewed (0-based).
15 */
16 pageIndex: 0,
17
18 /**
19 * @type {number}
20 * The current loading progress of the PDF document (0 - 100).
21 */
22 loadProgress: 0,
23
24 /**
25 * @type {number}
26 * The number of pages in the PDF document.
27 */
28 docLength: 1,
29
30 loadProgressChanged: function() {
31 if (this.loadProgress >= 100)
32 this.$.pageselector.style.visibility = 'visible';
33 },
34
35 selectPageNumber: function() {
36 this.$.pageselector.select();
37 },
38
39 rotateRight: function() {
40 this.fire('rotate-right');
41 },
42
43 toggleBookmarks: function() {
44 this.fire('toggle-bookmarks');
45 },
46
47 save: function() {
48 this.fire('save');
49 },
50
51 print: function() {
52 this.fire('print');
53 }
54 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698