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

Side by Side Diff: components/dom_distiller/core/javascript/dom_distiller_viewer.js

Issue 2108833002: Remove Simplify Page option from Print Preview (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Mark histogram entries as unused 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 | « components/dom_distiller/core/css/distilledpage.css ('k') | printing/print_job_constants.h » ('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 // This variable will be changed by iOS scripts. 5 // This variable will be changed by iOS scripts.
6 var distiller_on_ios = false; 6 var distiller_on_ios = false;
7 7
8 function addToPage(html) { 8 function addToPage(html) {
9 var div = document.createElement('div'); 9 var div = document.createElement('div');
10 div.innerHTML = html; 10 div.innerHTML = html;
(...skipping 22 matching lines...) Expand all
33 container.setAttribute('class', 'youtubeContainer'); 33 container.setAttribute('class', 'youtubeContainer');
34 container.appendChild(embed); 34 container.appendChild(embed);
35 35
36 parent.replaceChild(container, placeholders[i]); 36 parent.replaceChild(container, placeholders[i]);
37 } 37 }
38 } 38 }
39 39
40 function showLoadingIndicator(isLastPage) { 40 function showLoadingIndicator(isLastPage) {
41 document.getElementById('loadingIndicator').className = 41 document.getElementById('loadingIndicator').className =
42 isLastPage ? 'hidden' : 'visible'; 42 isLastPage ? 'hidden' : 'visible';
43 // This function will be one of the last things to occur when a page is
44 // loaded. This is temporarily used to signal print preview to generate
45 // a PDF.
46 if (isLastPage && typeof isPrintPreviewDistiller !== 'undefined'
47 && isPrintPreviewDistiller) {
48 setTimeout(function() {
49 window.location = window.location + "#loaded";
50 }, 0);
51 }
52 } 43 }
53 44
54 // Sets the title. 45 // Sets the title.
55 function setTitle(title) { 46 function setTitle(title) {
56 var holder = document.getElementById('titleHolder'); 47 var holder = document.getElementById('titleHolder');
57 48
58 holder.textContent = title; 49 holder.textContent = title;
59 document.title = title; 50 document.title = title;
60 } 51 }
61 52
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after
404 clampedScale = scaling; 395 clampedScale = scaling;
405 restoreCenter(); 396 restoreCenter();
406 } 397 }
407 }; 398 };
408 }()); 399 }());
409 400
410 window.addEventListener('touchstart', pincher.handleTouchStart, false); 401 window.addEventListener('touchstart', pincher.handleTouchStart, false);
411 window.addEventListener('touchmove', pincher.handleTouchMove, false); 402 window.addEventListener('touchmove', pincher.handleTouchMove, false);
412 window.addEventListener('touchend', pincher.handleTouchEnd, false); 403 window.addEventListener('touchend', pincher.handleTouchEnd, false);
413 window.addEventListener('touchcancel', pincher.handleTouchCancel, false); 404 window.addEventListener('touchcancel', pincher.handleTouchCancel, false);
OLDNEW
« no previous file with comments | « components/dom_distiller/core/css/distilledpage.css ('k') | printing/print_job_constants.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698