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

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

Issue 1527453002: PDF: Remove 'material' from file and variable names (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@pdf_remove_non_material
Patch Set: Created 5 years 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/pdf.js ('k') | chrome/test/data/pdf/basic_test.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 * Turn a dictionary received from postMessage into a key event. 6 * Turn a dictionary received from postMessage into a key event.
7 * @param {Object} dict A dictionary representing the key event. 7 * @param {Object} dict A dictionary representing the key event.
8 * @return {Event} A key event. 8 * @return {Event} A key event.
9 */ 9 */
10 function DeserializeKeyEvent(dict) { 10 function DeserializeKeyEvent(dict) {
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
268 * @param {string} src the source URL of the PDF to load initially. 268 * @param {string} src the source URL of the PDF to load initially.
269 * @return {HTMLIFrameElement} the iframe element containing the PDF viewer. 269 * @return {HTMLIFrameElement} the iframe element containing the PDF viewer.
270 */ 270 */
271 function PDFCreateOutOfProcessPlugin(src) { 271 function PDFCreateOutOfProcessPlugin(src) {
272 var client = new PDFScriptingAPI(window); 272 var client = new PDFScriptingAPI(window);
273 var iframe = window.document.createElement('iframe'); 273 var iframe = window.document.createElement('iframe');
274 // Prevent the frame from being tab-focusable. 274 // Prevent the frame from being tab-focusable.
275 iframe.setAttribute('tabindex', '-1'); 275 iframe.setAttribute('tabindex', '-1');
276 276
277 var EXTENSION_URL = 277 var EXTENSION_URL =
278 'chrome-extension://mhjfbmdgcfjbbpaeojofohoefgiehjai/index-material.html'; 278 'chrome-extension://mhjfbmdgcfjbbpaeojofohoefgiehjai/index.html';
279 iframe.setAttribute('src', EXTENSION_URL + '?' + src); 279 iframe.setAttribute('src', EXTENSION_URL + '?' + src);
280 iframe.onload = function() { 280 iframe.onload = function() {
281 client.setPlugin(iframe.contentWindow); 281 client.setPlugin(iframe.contentWindow);
282 }; 282 };
283 283
284 // Add the functions to the iframe so that they can be called directly. 284 // Add the functions to the iframe so that they can be called directly.
285 iframe.setViewportChangedCallback = 285 iframe.setViewportChangedCallback =
286 client.setViewportChangedCallback.bind(client); 286 client.setViewportChangedCallback.bind(client);
287 iframe.setLoadCallback = client.setLoadCallback.bind(client); 287 iframe.setLoadCallback = client.setLoadCallback.bind(client);
288 iframe.setKeyEventCallback = client.setKeyEventCallback.bind(client); 288 iframe.setKeyEventCallback = client.setKeyEventCallback.bind(client);
289 iframe.resetPrintPreviewMode = client.resetPrintPreviewMode.bind(client); 289 iframe.resetPrintPreviewMode = client.resetPrintPreviewMode.bind(client);
290 iframe.loadPreviewPage = client.loadPreviewPage.bind(client); 290 iframe.loadPreviewPage = client.loadPreviewPage.bind(client);
291 iframe.sendKeyEvent = client.sendKeyEvent.bind(client); 291 iframe.sendKeyEvent = client.sendKeyEvent.bind(client);
292 return iframe; 292 return iframe;
293 } 293 }
OLDNEW
« no previous file with comments | « chrome/browser/resources/pdf/pdf.js ('k') | chrome/test/data/pdf/basic_test.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698