summaryrefslogtreecommitdiff
path: root/chromium/chrome/browser/resources/print_preview/data/capabilities_holder.js
blob: cc5324a5af2599b48e097f8427203076151a27a4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

cr.define('print_preview', function() {
  'use strict';

  /**
   * Mutable reference to a CDD object.
   * @constructor
   */
  function CapabilitiesHolder() {
    /**
     * Reference to the capabilities object.
     * @type {print_preview.Cdd}
     * @private
     */
    this.capabilities_ = null;
  };

  CapabilitiesHolder.prototype = {
    /** @return {print_preview.Cdd} The instance held by the holder. */
    get: function() {
      return this.capabilities_;
    },

    /** @param {!print_preview.Cdd} New instance to put into the holder. */
    set: function(capabilities) {
      this.capabilities_ = capabilities;
    }
  };

  // Export
  return {
    CapabilitiesHolder: CapabilitiesHolder
  };
});