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

Side by Side Diff: chrome/browser/resources/pdf/pdf.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
« no previous file with comments | « chrome/browser/resources/pdf/index.html ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 'use strict'; 5 'use strict';
6 6
7 /** 7 /**
8 * @return {number} Width of a scrollbar in pixels 8 * @return {number} Width of a scrollbar in pixels
9 */ 9 */
10 function getScrollbarWidth() { 10 function getScrollbarWidth() {
(...skipping 539 matching lines...) Expand 10 before | Expand all | Expand 10 after
550 } 550 }
551 }, 551 },
552 552
553 /** 553 /**
554 * @private 554 * @private
555 * Load a dictionary of translated strings into the UI. Used as a callback for 555 * Load a dictionary of translated strings into the UI. Used as a callback for
556 * chrome.resourcesPrivate. 556 * chrome.resourcesPrivate.
557 * @param {Object} strings Dictionary of translated strings 557 * @param {Object} strings Dictionary of translated strings
558 */ 558 */
559 handleStrings_: function(strings) { 559 handleStrings_: function(strings) {
560 window.loadTimeData.data = strings; 560 document.documentElement.dir = strings.textdirection;
561 i18nTemplate.process(document, loadTimeData); 561 document.documentElement.lang = strings.language;
562 this.zoomToolbar_.updateTooltips(); 562
563 $('toolbar').strings = strings;
564 $('zoom-toolbar').strings = strings;
565 $('password-screen').strings = strings;
566 $('error-screen').strings = strings;
563 }, 567 },
564 568
565 /** 569 /**
566 * @private 570 * @private
567 * An event handler for handling password-submitted events. These are fired 571 * An event handler for handling password-submitted events. These are fired
568 * when an event is entered into the password screen. 572 * when an event is entered into the password screen.
569 * @param {Object} event a password-submitted event. 573 * @param {Object} event a password-submitted event.
570 */ 574 */
571 onPasswordSubmitted_: function(event) { 575 onPasswordSubmitted_: function(event) {
572 this.plugin_.postMessage({ 576 this.plugin_.postMessage({
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after
874 * Each bookmark is an Object containing a: 878 * Each bookmark is an Object containing a:
875 * - title 879 * - title
876 * - page (optional) 880 * - page (optional)
877 * - array of children (themselves bookmarks) 881 * - array of children (themselves bookmarks)
878 * @type {Array} the top-level bookmarks of the PDF. 882 * @type {Array} the top-level bookmarks of the PDF.
879 */ 883 */
880 get bookmarks() { 884 get bookmarks() {
881 return this.bookmarks_; 885 return this.bookmarks_;
882 } 886 }
883 }; 887 };
OLDNEW
« no previous file with comments | « chrome/browser/resources/pdf/index.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698