Index: chrome/browser/resources/print_preview/data/capabilities_holder.js |
diff --git a/chrome/browser/resources/print_preview/data/capabilities_holder.js b/chrome/browser/resources/print_preview/data/capabilities_holder.js |
new file mode 100644 |
index 0000000000000000000000000000000000000000..bb4a1aaadf031a75b1f8de8e2da550ef47774731 |
--- /dev/null |
+++ b/chrome/browser/resources/print_preview/data/capabilities_holder.js |
@@ -0,0 +1,43 @@ |
+// 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 capabilities object. |
+ * @constructor |
+ */ |
+ function CapabilitiesHolder() { |
+ /** |
+ * Reference to the capabilities object. |
+ * @type {print_preview.ChromiumCapabilities} |
+ * @private |
+ */ |
+ this.capabilities_ = null; |
+ }; |
+ |
+ CapabilitiesHolder.prototype = { |
+ /** |
+ * @return {print_preview.ChromiumCapabilities} The instance held by the |
+ * holder. |
+ */ |
+ get: function() { |
+ return this.capabilities_; |
+ }, |
+ |
+ /** |
+ * @param {!print_preview.ChromiumCapabilities} New instance to put into the |
+ * holder. |
+ */ |
+ set: function(capabilities) { |
+ this.capabilities_ = capabilities; |
+ } |
+ }; |
+ |
+ // Export |
+ return { |
+ CapabilitiesHolder: CapabilitiesHolder |
+ }; |
+}); |