Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(105)

Side by Side Diff: chrome/browser/resources/print_preview/data/capabilities_holder.js

Issue 588713002: Compile print_preview, part 3: reduce down to 185 errors (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@I_print_preview_2
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 cr.define('print_preview', function() { 5 cr.define('print_preview', function() {
6 'use strict'; 6 'use strict';
7 7
8 /** 8 /**
9 * Mutable reference to a CDD object. 9 * Mutable reference to a CDD object.
10 * @constructor 10 * @constructor
11 */ 11 */
12 function CapabilitiesHolder() { 12 function CapabilitiesHolder() {
13 /** 13 /**
14 * Reference to the capabilities object. 14 * Reference to the capabilities object.
15 * @type {print_preview.Cdd} 15 * @type {?print_preview.Cdd}
Aleksey Shlyapnikov 2014/09/22 22:00:40 I thought objects are nullable by default, why do
Vitaly Pavlenko 2014/09/22 22:33:11 Well, objects are, but typedefed objects aren't: h
16 * @private 16 * @private
17 */ 17 */
18 this.capabilities_ = null; 18 this.capabilities_ = null;
19 }; 19 };
20 20
21 CapabilitiesHolder.prototype = { 21 CapabilitiesHolder.prototype = {
22 /** @return {print_preview.Cdd} The instance held by the holder. */ 22 /** @return {?print_preview.Cdd} The instance held by the holder. */
23 get: function() { 23 get: function() {
24 return this.capabilities_; 24 return this.capabilities_;
25 }, 25 },
26 26
27 /** 27 /**
28 * @param {!print_preview.Cdd} capabilities New instance to put into the 28 * @param {?print_preview.Cdd} capabilities New instance to put into the
Aleksey Shlyapnikov 2014/09/22 22:00:40 Why did you replace '!' with '?'? The idea was tha
Vitaly Pavlenko 2014/09/22 22:33:11 Sorry about that, reverted.
29 * holder. 29 * holder.
30 */ 30 */
31 set: function(capabilities) { 31 set: function(capabilities) {
32 this.capabilities_ = capabilities; 32 this.capabilities_ = capabilities;
33 } 33 }
34 }; 34 };
35 35
36 // Export 36 // Export
37 return { 37 return {
38 CapabilitiesHolder: CapabilitiesHolder 38 CapabilitiesHolder: CapabilitiesHolder
39 }; 39 };
40 }); 40 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698