Elim cr-checkbox
[chromium-blink-merge.git] / chrome / browser / resources / print_preview / data / ticket_items / css_background.js
blobdbaca9132e82c371d83c5a7801d274a164a5a15b
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() {
6 'use strict';
8 /**
9 * Ticket item whose value is a {@code boolean} that represents whether to
10 * print CSS backgrounds.
11 * @param {!print_preview.AppState} appState App state to persist CSS
12 * background value.
13 * @param {!print_preview.DocumentInfo} documentInfo Information about the
14 * document to print.
15 * @constructor
16 * @extends {print_preview.ticket_items.TicketItem}
18 function CssBackground(appState, documentInfo) {
19 print_preview.ticket_items.TicketItem.call(
20 this,
21 appState,
22 print_preview.AppState.Field.IS_CSS_BACKGROUND_ENABLED,
23 null /*destinationStore*/,
24 documentInfo);
27 CssBackground.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.getDocumentInfoInternal().isModifiable;
40 /** @override */
41 getDefaultValueInternal: function() {
42 return false;
45 /** @override */
46 getCapabilityNotAvailableValueInternal: function() {
47 return false;
51 // Export
52 return {
53 CssBackground: CssBackground
55 });