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
3 // found in the LICENSE file.
5 cr.define('print_preview.ticket_items', function() {
9 * Ticket item whose value is a {@code boolean} that represents whether to
10 * print selection only.
11 * @param {!print_preview.DocumentInfo} documentInfo Information about the
14 * @extends {print_preview.ticket_items.TicketItem}
16 function SelectionOnly(documentInfo) {
17 print_preview.ticket_items.TicketItem.call(
21 null /*destinationStore*/,
25 SelectionOnly.prototype = {
26 __proto__: print_preview.ticket_items.TicketItem.prototype,
29 wouldValueBeValid: function(value) {
34 isCapabilityAvailable: function() {
35 return this.getDocumentInfoInternal().isModifiable &&
36 this.getDocumentInfoInternal().hasSelection;
40 getDefaultValueInternal: function() {
45 getCapabilityNotAvailableValueInternal: function() {
52 SelectionOnly: SelectionOnly