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

Side by Side Diff: chrome/browser/resources/pdf/pdf_scripting_api.js

Issue 574193002: Compile print_preview, part 1: remove all warnings (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@true_master
Patch Set: rebase Created 6 years, 3 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 | « no previous file | chrome/browser/resources/print_preview/cloud_print_interface.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 /** 5 /**
6 * Create a new PDFScriptingAPI. This provides a scripting interface to 6 * Create a new PDFScriptingAPI. This provides a scripting interface to
7 * the PDF viewer so that it can be customized by things like print preview. 7 * the PDF viewer so that it can be customized by things like print preview.
8 * @param {Window} window the window of the page containing the pdf viewer. 8 * @param {Window} window the window of the page containing the pdf viewer.
9 * @param {string} extensionUrl the url of the PDF extension. 9 * @param {string} extensionUrl the url of the PDF extension.
10 */ 10 */
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 } 42 }
43 }.bind(this), false); 43 }.bind(this), false);
44 } 44 }
45 45
46 PDFScriptingAPI.prototype = { 46 PDFScriptingAPI.prototype = {
47 /** 47 /**
48 * @private 48 * @private
49 * Send a message to the extension. If we try to send messages prior to the 49 * Send a message to the extension. If we try to send messages prior to the
50 * extension being ready to receive messages (i.e. before it has finished 50 * extension being ready to receive messages (i.e. before it has finished
51 * loading) we queue up the messages and flush them later. 51 * loading) we queue up the messages and flush them later.
52 * @param {Object} the message to send. 52 * @param {Object} message The message to send.
53 */ 53 */
54 sendMessage_: function(message) { 54 sendMessage_: function(message) {
55 if (!this.pdfWindow_) { 55 if (!this.pdfWindow_) {
56 this.messageQueue_.push(message); 56 this.messageQueue_.push(message);
57 return; 57 return;
58 } 58 }
59 59
60 this.pdfWindow_.postMessage(message, this.extensionUrl_); 60 this.pdfWindow_.postMessage(message, this.extensionUrl_);
61 }, 61 },
62 62
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 172
173 // Add the functions to the iframe so that they can be called directly. 173 // Add the functions to the iframe so that they can be called directly.
174 iframe.setViewportChangedCallback = 174 iframe.setViewportChangedCallback =
175 client.setViewportChangedCallback.bind(client); 175 client.setViewportChangedCallback.bind(client);
176 iframe.setLoadCallback = client.setLoadCallback.bind(client); 176 iframe.setLoadCallback = client.setLoadCallback.bind(client);
177 iframe.resetPrintPreviewMode = client.resetPrintPreviewMode.bind(client); 177 iframe.resetPrintPreviewMode = client.resetPrintPreviewMode.bind(client);
178 iframe.loadPreviewPage = client.loadPreviewPage.bind(client); 178 iframe.loadPreviewPage = client.loadPreviewPage.bind(client);
179 iframe.sendKeyEvent = client.sendKeyEvent.bind(client); 179 iframe.sendKeyEvent = client.sendKeyEvent.bind(client);
180 return iframe; 180 return iframe;
181 } 181 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/resources/print_preview/cloud_print_interface.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698