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

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

Issue 909143004: Add support for starting an extension print job to print preview (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: vitaly's feedback Created 5 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
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 cr.define('print_preview', function() { 5 cr.define('print_preview', function() {
6 'use strict'; 6 'use strict';
7 7
8 /** 8 /**
9 * Creates a PrintHeader object. This object encapsulates all the elements 9 * Creates a PrintHeader object. This object encapsulates all the elements
10 * and logic related to the top part of the left pane in print_preview.html. 10 * and logic related to the top part of the left pane in print_preview.html.
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 this.onTicketChange_.bind(this)); 135 this.onTicketChange_.bind(this));
136 }, 136 },
137 137
138 /** 138 /**
139 * Updates Print Button state. 139 * Updates Print Button state.
140 * @private 140 * @private
141 */ 141 */
142 updatePrintButtonEnabledState_: function() { 142 updatePrintButtonEnabledState_: function() {
143 this.getChildElement('button.print').disabled = 143 this.getChildElement('button.print').disabled =
144 this.destinationStore_.selectedDestination == null || 144 this.destinationStore_.selectedDestination == null ||
145 // TODO(tbarzic): Remove this when print request for extension
146 // destinations is wired up.
147 this.destinationStore_.selectedDestination.isExtension ||
148 !this.isEnabled_ || 145 !this.isEnabled_ ||
149 !this.isPrintButtonEnabled_ || 146 !this.isPrintButtonEnabled_ ||
150 !this.printTicketStore_.isTicketValid(); 147 !this.printTicketStore_.isTicketValid();
151 }, 148 },
152 149
153 /** 150 /**
154 * Updates the summary element based on the currently selected user options. 151 * Updates the summary element based on the currently selected user options.
155 * @private 152 * @private
156 */ 153 */
157 updateSummary_: function() { 154 updateSummary_: function() {
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 this.getChildElement('button.print').focus(); 266 this.getChildElement('button.print').focus();
270 } 267 }
271 } 268 }
272 }; 269 };
273 270
274 // Export 271 // Export
275 return { 272 return {
276 PrintHeader: PrintHeader 273 PrintHeader: PrintHeader
277 }; 274 };
278 }); 275 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698