| 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 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 160 this.target().resourceTreeModel.addEventListener(WebInspector.ResourceTr
eeModel.EventTypes.SecurityOriginAdded, this._securityOriginAdded, this); | 160 this.target().resourceTreeModel.addEventListener(WebInspector.ResourceTr
eeModel.EventTypes.SecurityOriginAdded, this._securityOriginAdded, this); |
| 161 this.target().resourceTreeModel.addEventListener(WebInspector.ResourceTr
eeModel.EventTypes.SecurityOriginRemoved, this._securityOriginRemoved, this); | 161 this.target().resourceTreeModel.addEventListener(WebInspector.ResourceTr
eeModel.EventTypes.SecurityOriginRemoved, this._securityOriginRemoved, this); |
| 162 | 162 |
| 163 var securityOrigins = this.target().resourceTreeModel.securityOrigins(); | 163 var securityOrigins = this.target().resourceTreeModel.securityOrigins(); |
| 164 for (var i = 0; i < securityOrigins.length; ++i) | 164 for (var i = 0; i < securityOrigins.length; ++i) |
| 165 this._addOrigin(securityOrigins[i]); | 165 this._addOrigin(securityOrigins[i]); |
| 166 | 166 |
| 167 this._enabled = true; | 167 this._enabled = true; |
| 168 }, | 168 }, |
| 169 | 169 |
| 170 /** |
| 171 * @param {string} origin |
| 172 */ |
| 173 clearForOrigin: function(origin) |
| 174 { |
| 175 if (!this._enabled) |
| 176 return; |
| 177 |
| 178 this._removeOrigin(origin); |
| 179 this._addOrigin(origin); |
| 180 }, |
| 181 |
| 170 refreshDatabaseNames: function() | 182 refreshDatabaseNames: function() |
| 171 { | 183 { |
| 172 for (var securityOrigin in this._databaseNamesBySecurityOrigin) | 184 for (var securityOrigin in this._databaseNamesBySecurityOrigin) |
| 173 this._loadDatabaseNames(securityOrigin); | 185 this._loadDatabaseNames(securityOrigin); |
| 174 }, | 186 }, |
| 175 | 187 |
| 176 /** | 188 /** |
| 177 * @param {!WebInspector.IndexedDBModel.DatabaseId} databaseId | 189 * @param {!WebInspector.IndexedDBModel.DatabaseId} databaseId |
| 178 */ | 190 */ |
| 179 refreshDatabase: function(databaseId) | 191 refreshDatabase: function(databaseId) |
| (...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 521 * @param {!WebInspector.Target} target | 533 * @param {!WebInspector.Target} target |
| 522 * @return {?WebInspector.IndexedDBModel} | 534 * @return {?WebInspector.IndexedDBModel} |
| 523 */ | 535 */ |
| 524 WebInspector.IndexedDBModel.fromTarget = function(target) | 536 WebInspector.IndexedDBModel.fromTarget = function(target) |
| 525 { | 537 { |
| 526 var model = /** @type {?WebInspector.IndexedDBModel} */ (target.model(WebIns
pector.IndexedDBModel)); | 538 var model = /** @type {?WebInspector.IndexedDBModel} */ (target.model(WebIns
pector.IndexedDBModel)); |
| 527 if (!model) | 539 if (!model) |
| 528 model = new WebInspector.IndexedDBModel(target); | 540 model = new WebInspector.IndexedDBModel(target); |
| 529 return model; | 541 return model; |
| 530 } | 542 } |
| OLD | NEW |