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

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

Issue 2961863002: Print Preview: close dialog when system dialog is open (Win) (Closed)
Patch Set: Address comments Created 3 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 | « no previous file | chrome/browser/ui/webui/print_preview/print_preview_handler.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 // TODO(rltoscano): Move data/* into print_preview.data namespace 5 // TODO(rltoscano): Move data/* into print_preview.data namespace
6 6
7 // <include src="component.js"> 7 // <include src="component.js">
8 // <include src="print_preview_focus_manager.js"> 8 // <include src="print_preview_focus_manager.js">
9 // 9 //
10 10
(...skipping 589 matching lines...) Expand 10 before | Expand all | Expand 10 after
600 destination.id == 600 destination.id ==
601 print_preview.Destination.GooglePromotedId.SAVE_AS_PDF) { 601 print_preview.Destination.GooglePromotedId.SAVE_AS_PDF) {
602 // Save as PDF resolves when file selection is completed or cancelled. 602 // Save as PDF resolves when file selection is completed or cancelled.
603 whenPrintDone.then( 603 whenPrintDone.then(
604 this.onFileSelectionComplete_.bind(this), 604 this.onFileSelectionComplete_.bind(this),
605 this.onFileSelectionCancel_.bind(this)); 605 this.onFileSelectionCancel_.bind(this));
606 } else { // standard local printer 606 } else { // standard local printer
607 var boundHideDialog = function () { 607 var boundHideDialog = function () {
608 this.nativeLayer_.startHideDialog(); 608 this.nativeLayer_.startHideDialog();
609 }.bind(this); 609 }.bind(this);
610 // Local printers resolve when print is started. Hide the dialog. 610 // Local printers resolve when print is ready to start. Hide the
611 // dialog.
611 whenPrintDone.then(boundHideDialog, boundHideDialog); 612 whenPrintDone.then(boundHideDialog, boundHideDialog);
612 } 613 }
613 614
614 this.showSystemDialogBeforeNextPrint_ = false; 615 this.showSystemDialogBeforeNextPrint_ = false;
615 return print_preview.PrintAttemptResult_.PRINTED; 616 return print_preview.PrintAttemptResult_.PRINTED;
616 }, 617 },
617 618
618 /** 619 /**
619 * Closes the print preview. 620 * Closes the print preview.
620 * @param {boolean} isCancel Whether this was called due to the user 621 * @param {boolean} isCancel Whether this was called due to the user
(...skipping 742 matching lines...) Expand 10 before | Expand all | Expand 10 after
1363 // <include src="search/destination_search.js"> 1364 // <include src="search/destination_search.js">
1364 // <include src="search/provisional_destination_resolver.js"> 1365 // <include src="search/provisional_destination_resolver.js">
1365 1366
1366 window.addEventListener('DOMContentLoaded', function() { 1367 window.addEventListener('DOMContentLoaded', function() {
1367 var previewWindow = /** @type {{isTest: boolean}} */ (window); 1368 var previewWindow = /** @type {{isTest: boolean}} */ (window);
1368 if (!previewWindow.isTest) { 1369 if (!previewWindow.isTest) {
1369 var printPreview = new print_preview.PrintPreview(); 1370 var printPreview = new print_preview.PrintPreview();
1370 printPreview.initialize(); 1371 printPreview.initialize();
1371 } 1372 }
1372 }); 1373 });
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/webui/print_preview/print_preview_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698