Elim cr-checkbox
[chromium-blink-merge.git] / chrome / browser / resources / print_preview / data / ticket_items / distill_page.js
blob9e99b94290207b21371392760ae6657f7208167c
1 // Copyright 2015 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() {
6 'use strict';
8 /**
9 * Ticket item whose value is a {@code boolean} that represents whether to
10 * distill the page before printing.
11 * @param {!print_preview.DocumentInfo} documentInfo Information about the
12 * document to print.
13 * @constructor
14 * @extends {print_preview.ticket_items.TicketItem}
16 function DistillPage(documentInfo) {
17 print_preview.ticket_items.TicketItem.call(
18 this,
19 null /*appState*/,
20 null /*field*/,
21 null /*destinationStore*/,
22 documentInfo);
24 this.isAvailable_ = false;
27 DistillPage.prototype = {
28 __proto__: print_preview.ticket_items.TicketItem.prototype,
30 /** @override */
31 wouldValueBeValid: function(value) {
32 return true;
35 /** @override */
36 isCapabilityAvailable: function() {
37 return this.isAvailable_;
40 /** @override */
41 getDefaultValueInternal: function() {
42 return false;
45 /** @override */
46 getCapabilityNotAvailableValueInternal: function() {
47 return false;
50 setIsCapabilityAvailable: function(isAvailable) {
51 if (this.isAvailable_ == isAvailable)
52 return;
54 this.isAvailable_ = isAvailable;
55 this.dispatchChangeEventInternal();
59 // Export
60 return {
61 DistillPage: DistillPage
63 });