| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 /** | 5 /** |
| 6 * @fileoverview Class providing common dependencies for the extension's | 6 * @fileoverview Class providing common dependencies for the extension's |
| 7 * top half. | 7 * top half. |
| 8 */ | 8 */ |
| 9 'use strict'; | 9 'use strict'; |
| 10 | 10 |
| 11 /** | 11 /** |
| 12 * @param {!AppIdCheckerFactory} appIdCheckerFactory An appId checker factory. | 12 * @param {!AppIdCheckerFactory} appIdCheckerFactory An appId checker factory. |
| 13 * @param {!ApprovedOrigins} approvedOrigins An origin approval implementation. | 13 * @param {!ApprovedOrigins} approvedOrigins An origin approval implementation. |
| 14 * @param {!CountdownFactory} countdownFactory A countdown timer factory. | 14 * @param {!CountdownFactory} countdownFactory A countdown timer factory. |
| 15 * @param {!OriginChecker} originChecker An origin checker. | 15 * @param {!OriginChecker} originChecker An origin checker. |
| 16 * @param {!RequestHelper} requestHelper A request helper. | 16 * @param {!RequestHelper} requestHelper A request helper. |
| 17 * @param {!SystemTimer} sysTimer A system timer implementation. | 17 * @param {!SystemTimer} sysTimer A system timer implementation. |
| 18 * @param {!TextFetcher} textFetcher A text fetcher. | 18 * @param {!TextFetcher} textFetcher A text fetcher. |
| 19 * @constructor | 19 * @constructor |
| 20 */ | 20 */ |
| 21 function FactoryRegistry(appIdCheckerFactory, approvedOrigins, countdownFactory, | 21 function FactoryRegistry( |
| 22 originChecker, requestHelper, sysTimer, textFetcher) { | 22 appIdCheckerFactory, approvedOrigins, countdownFactory, originChecker, |
| 23 requestHelper, sysTimer, textFetcher) { |
| 23 /** @private {!AppIdCheckerFactory} */ | 24 /** @private {!AppIdCheckerFactory} */ |
| 24 this.appIdCheckerFactory_ = appIdCheckerFactory; | 25 this.appIdCheckerFactory_ = appIdCheckerFactory; |
| 25 /** @private {!ApprovedOrigins} */ | 26 /** @private {!ApprovedOrigins} */ |
| 26 this.approvedOrigins_ = approvedOrigins; | 27 this.approvedOrigins_ = approvedOrigins; |
| 27 /** @private {!CountdownFactory} */ | 28 /** @private {!CountdownFactory} */ |
| 28 this.countdownFactory_ = countdownFactory; | 29 this.countdownFactory_ = countdownFactory; |
| 29 /** @private {!OriginChecker} */ | 30 /** @private {!OriginChecker} */ |
| 30 this.originChecker_ = originChecker; | 31 this.originChecker_ = originChecker; |
| 31 /** @private {!RequestHelper} */ | 32 /** @private {!RequestHelper} */ |
| 32 this.requestHelper_ = requestHelper; | 33 this.requestHelper_ = requestHelper; |
| (...skipping 30 matching lines...) Expand all Loading... |
| 63 | 64 |
| 64 /** @return {!SystemTimer} A system timer implementation. */ | 65 /** @return {!SystemTimer} A system timer implementation. */ |
| 65 FactoryRegistry.prototype.getSystemTimer = function() { | 66 FactoryRegistry.prototype.getSystemTimer = function() { |
| 66 return this.sysTimer_; | 67 return this.sysTimer_; |
| 67 }; | 68 }; |
| 68 | 69 |
| 69 /** @return {!TextFetcher} A text fetcher. */ | 70 /** @return {!TextFetcher} A text fetcher. */ |
| 70 FactoryRegistry.prototype.getTextFetcher = function() { | 71 FactoryRegistry.prototype.getTextFetcher = function() { |
| 71 return this.textFetcher_; | 72 return this.textFetcher_; |
| 72 }; | 73 }; |
| OLD | NEW |