OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 16 matching lines...) Expand all Loading... |
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
29 */ | 29 */ |
30 | 30 |
31 /** | 31 /** |
32 * @unrestricted | 32 * @unrestricted |
33 */ | 33 */ |
34 Resources.IndexedDBModel = class extends SDK.SDKModel { | 34 Resources.IndexedDBModel = class extends SDK.SDKModel { |
35 /** | 35 /** |
36 * @param {!SDK.Target} target | 36 * @param {!SDK.Target} target |
| 37 * @param {!Protocol.Dispatcher} dispatcher |
37 */ | 38 */ |
38 constructor(target) { | 39 constructor(target, dispatcher) { |
39 super(target); | 40 super(target, dispatcher); |
40 this._securityOriginManager = target.model(SDK.SecurityOriginManager); | 41 this._securityOriginManager = target.model(SDK.SecurityOriginManager); |
41 this._agent = target.indexedDBAgent(); | 42 this._agent = dispatcher.indexedDBAgent(); |
42 | 43 |
43 /** @type {!Map.<!Resources.IndexedDBModel.DatabaseId, !Resources.IndexedDBM
odel.Database>} */ | 44 /** @type {!Map.<!Resources.IndexedDBModel.DatabaseId, !Resources.IndexedDBM
odel.Database>} */ |
44 this._databases = new Map(); | 45 this._databases = new Map(); |
45 /** @type {!Object.<string, !Array.<string>>} */ | 46 /** @type {!Object.<string, !Array.<string>>} */ |
46 this._databaseNamesBySecurityOrigin = {}; | 47 this._databaseNamesBySecurityOrigin = {}; |
47 } | 48 } |
48 | 49 |
49 /** | 50 /** |
50 * @param {*} idbKey | 51 * @param {*} idbKey |
51 * @return {({ | 52 * @return {({ |
(...skipping 486 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
538 } | 539 } |
539 | 540 |
540 /** | 541 /** |
541 * @return {string} | 542 * @return {string} |
542 */ | 543 */ |
543 get keyPathString() { | 544 get keyPathString() { |
544 return /** @type {string}*/ ( | 545 return /** @type {string}*/ ( |
545 Resources.IndexedDBModel.keyPathStringFromIDBKeyPath(/** @type {string}*
/ (this.keyPath))); | 546 Resources.IndexedDBModel.keyPathStringFromIDBKeyPath(/** @type {string}*
/ (this.keyPath))); |
546 } | 547 } |
547 }; | 548 }; |
OLD | NEW |