| Index: chrome/browser/resources/print_preview/data/ticket_items/margins_type.js
|
| diff --git a/chrome/browser/resources/print_preview/data/ticket_items/margins_type.js b/chrome/browser/resources/print_preview/data/ticket_items/margins_type.js
|
| index 2daa9193c68e985f966fe6dd4a3b709839cd9afb..02f7f155fe2a77b8acb5b7de750275df045c9b33 100644
|
| --- a/chrome/browser/resources/print_preview/data/ticket_items/margins_type.js
|
| +++ b/chrome/browser/resources/print_preview/data/ticket_items/margins_type.js
|
| @@ -2,12 +2,27 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| +cr.exportPath('print_preview.ticket_items');
|
| +
|
| +/**
|
| + * Must be kept in sync with the C++ MarginType enum in
|
| + * printing/print_job_constants.h.
|
| + * @enum {number}
|
| + */
|
| +print_preview.ticket_items.MarginsTypeValue = {
|
| + DEFAULT: 0,
|
| + NO_MARGINS: 1,
|
| + MINIMUM: 2,
|
| + CUSTOM: 3
|
| +};
|
| +
|
| +
|
| cr.define('print_preview.ticket_items', function() {
|
| 'use strict';
|
|
|
| /**
|
| * Margins type ticket item whose value is a
|
| - * {@link print_preview.ticket_items.MarginsType.Value} that indicates what
|
| + * print_preview.ticket_items.MarginsTypeValue} that indicates what
|
| * predefined margins type to use.
|
| * @param {!print_preview.AppState} appState App state persistence object to
|
| * save the state of the margins type selection.
|
| @@ -34,18 +49,6 @@ cr.define('print_preview.ticket_items', function() {
|
| this.customMargins_ = customMargins;
|
| };
|
|
|
| - /**
|
| - * Enumeration of margin types. Matches enum MarginType in
|
| - * printing/print_job_constants.h.
|
| - * @enum {number}
|
| - */
|
| - MarginsType.Value = {
|
| - DEFAULT: 0,
|
| - NO_MARGINS: 1,
|
| - MINIMUM: 2,
|
| - CUSTOM: 3
|
| - };
|
| -
|
| MarginsType.prototype = {
|
| __proto__: print_preview.ticket_items.TicketItem.prototype,
|
|
|
| @@ -61,12 +64,12 @@ cr.define('print_preview.ticket_items', function() {
|
|
|
| /** @override */
|
| getDefaultValueInternal: function() {
|
| - return MarginsType.Value.DEFAULT;
|
| + return print_preview.ticket_items.MarginsTypeValue.DEFAULT;
|
| },
|
|
|
| /** @override */
|
| getCapabilityNotAvailableValueInternal: function() {
|
| - return MarginsType.Value.DEFAULT;
|
| + return print_preview.ticket_items.MarginsTypeValue.DEFAULT;
|
| },
|
|
|
| /** @override */
|
| @@ -74,7 +77,7 @@ cr.define('print_preview.ticket_items', function() {
|
| print_preview.ticket_items.TicketItem.prototype.updateValueInternal.call(
|
| this, value);
|
| if (this.isValueEqual(
|
| - print_preview.ticket_items.MarginsType.Value.CUSTOM)) {
|
| + print_preview.ticket_items.MarginsTypeValue.CUSTOM)) {
|
| // If CUSTOM, set the value of the custom margins so that it won't be
|
| // overridden by the default value.
|
| this.customMargins_.updateValue(this.customMargins_.getValue());
|
|
|