forked from google/u2f-ref-code
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfactoryregistry.js
More file actions
74 lines (65 loc) · 2.49 KB
/
factoryregistry.js
File metadata and controls
74 lines (65 loc) · 2.49 KB
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
// Copyright 2014 Google Inc. All rights reserved
//
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file or at
// https://developers.google.com/open-source/licenses/bsd
/**
* @fileoverview Class providing common dependencies for the extension's
* top half.
*/
'use strict';
/**
* @param {!AppIdCheckerFactory} appIdCheckerFactory An appId checker factory.
* @param {!ApprovedOrigins} approvedOrigins An origin approval implementation.
* @param {!CountdownFactory} countdownFactory A countdown timer factory.
* @param {!OriginChecker} originChecker An origin checker.
* @param {!RequestHelper} requestHelper A request helper.
* @param {!SystemTimer} sysTimer A system timer implementation.
* @param {!TextFetcher} textFetcher A text fetcher.
* @constructor
*/
function FactoryRegistry(appIdCheckerFactory, approvedOrigins, countdownFactory,
originChecker, requestHelper, sysTimer, textFetcher) {
/** @private {!AppIdCheckerFactory} */
this.appIdCheckerFactory_ = appIdCheckerFactory;
/** @private {!ApprovedOrigins} */
this.approvedOrigins_ = approvedOrigins;
/** @private {!CountdownFactory} */
this.countdownFactory_ = countdownFactory;
/** @private {!OriginChecker} */
this.originChecker_ = originChecker;
/** @private {!RequestHelper} */
this.requestHelper_ = requestHelper;
/** @private {!SystemTimer} */
this.sysTimer_ = sysTimer;
/** @private {!TextFetcher} */
this.textFetcher_ = textFetcher;
}
/** @return {!AppIdCheckerFactory} An appId checker factory. */
FactoryRegistry.prototype.getAppIdCheckerFactory = function() {
return this.appIdCheckerFactory_;
};
/** @return {!ApprovedOrigins} An origin approval implementation. */
FactoryRegistry.prototype.getApprovedOrigins = function() {
return this.approvedOrigins_;
};
/** @return {!CountdownFactory} A countdown factory. */
FactoryRegistry.prototype.getCountdownFactory = function() {
return this.countdownFactory_;
};
/** @return {!OriginChecker} An origin checker. */
FactoryRegistry.prototype.getOriginChecker = function() {
return this.originChecker_;
};
/** @return {!RequestHelper} A request helper. */
FactoryRegistry.prototype.getRequestHelper = function() {
return this.requestHelper_;
};
/** @return {!SystemTimer} A system timer implementation. */
FactoryRegistry.prototype.getSystemTimer = function() {
return this.sysTimer_;
};
/** @return {!TextFetcher} A text fetcher. */
FactoryRegistry.prototype.getTextFetcher = function() {
return this.textFetcher_;
};