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

Side by Side Diff: chrome/browser/resources/print_preview.js

Issue 6479004: Print Preview: Hook up the print button to initiate a normal print operation.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 var localStrings = new LocalStrings(); 5 var localStrings = new LocalStrings();
6 var hasPDFPlugin = true; 6 var hasPDFPlugin = true;
7 7
8 /** 8 /**
9 * Window onload handler, sets up the page. 9 * Window onload handler, sets up the page.
10 */ 10 */
11 function load() { 11 function load() {
12 $('print-button').addEventListener('click', function(e) {
13 chrome.send('print');
14 });
12 $('cancel-button').addEventListener('click', function(e) { 15 $('cancel-button').addEventListener('click', function(e) {
13 window.close(); 16 window.close();
14 }); 17 });
15 18
16 chrome.send('getPrinters'); 19 chrome.send('getPrinters');
17 }; 20 };
18 21
19 /** 22 /**
20 * Fill the printer list drop down. 23 * Fill the printer list drop down.
21 */ 24 */
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 if (!pdfPlugin.onload) { 67 if (!pdfPlugin.onload) {
65 hasPDFPlugin = false; 68 hasPDFPlugin = false;
66 mainView.removeChild(pdfPlugin); 69 mainView.removeChild(pdfPlugin);
67 $('no-plugin').classList.remove('hidden'); 70 $('no-plugin').classList.remove('hidden');
68 return; 71 return;
69 } 72 }
70 pdfPlugin.onload('onPDFLoad()'); 73 pdfPlugin.onload('onPDFLoad()');
71 } 74 }
72 75
73 window.addEventListener('DOMContentLoaded', load); 76 window.addEventListener('DOMContentLoaded', load);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698