OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2008 Nokia Inc. All rights reserved. | 2 * Copyright (C) 2008 Nokia Inc. All rights reserved. |
3 * Copyright (C) 2013 Samsung Electronics. All rights reserved. | 3 * Copyright (C) 2013 Samsung Electronics. All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * | 8 * |
9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
308 action.redo(); | 308 action.redo(); |
309 } | 309 } |
310 } | 310 } |
311 | 311 |
312 /** | 312 /** |
313 * @constructor | 313 * @constructor |
314 * @extends {WebInspector.Object} | 314 * @extends {WebInspector.Object} |
315 */ | 315 */ |
316 WebInspector.DOMStorageModel = function() | 316 WebInspector.DOMStorageModel = function() |
317 { | 317 { |
| 318 /** @type {!Object.<string, !WebInspector.DOMStorage>} */ |
318 this._storages = {}; | 319 this._storages = {}; |
319 InspectorBackend.registerDOMStorageDispatcher(new WebInspector.DOMStorageDis
patcher(this)); | 320 InspectorBackend.registerDOMStorageDispatcher(new WebInspector.DOMStorageDis
patcher(this)); |
320 DOMStorageAgent.enable(); | 321 DOMStorageAgent.enable(); |
321 WebInspector.resourceTreeModel.addEventListener(WebInspector.ResourceTreeMod
el.EventTypes.SecurityOriginAdded, this._securityOriginAdded, this); | 322 WebInspector.resourceTreeModel.addEventListener(WebInspector.ResourceTreeMod
el.EventTypes.SecurityOriginAdded, this._securityOriginAdded, this); |
322 WebInspector.resourceTreeModel.addEventListener(WebInspector.ResourceTreeMod
el.EventTypes.SecurityOriginRemoved, this._securityOriginRemoved, this); | 323 WebInspector.resourceTreeModel.addEventListener(WebInspector.ResourceTreeMod
el.EventTypes.SecurityOriginRemoved, this._securityOriginRemoved, this); |
323 } | 324 } |
324 | 325 |
325 WebInspector.DOMStorageModel.Events = { | 326 WebInspector.DOMStorageModel.Events = { |
326 DOMStorageAdded: "DOMStorageAdded", | 327 DOMStorageAdded: "DOMStorageAdded", |
327 DOMStorageRemoved: "DOMStorageRemoved", | 328 DOMStorageRemoved: "DOMStorageRemoved", |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
424 }, | 425 }, |
425 | 426 |
426 /** | 427 /** |
427 * @param {DOMStorageAgent.StorageId} storageId | 428 * @param {DOMStorageAgent.StorageId} storageId |
428 * @param {string} key | 429 * @param {string} key |
429 * @param {string} oldValue | 430 * @param {string} oldValue |
430 * @param {string} newValue | 431 * @param {string} newValue |
431 */ | 432 */ |
432 _domStorageItemUpdated: function(storageId, key, oldValue, newValue) | 433 _domStorageItemUpdated: function(storageId, key, oldValue, newValue) |
433 { | 434 { |
434 var domStorage = this._storages[storageId]; | 435 var domStorage = this.storageForId(storageId); |
435 var storageData = { | 436 var storageData = { |
436 storage: domStorage, | 437 storage: domStorage, |
437 key: key, | 438 key: key, |
438 oldValue: oldValue, | 439 oldValue: oldValue, |
439 newValue: newValue | 440 newValue: newValue |
440 }; | 441 }; |
441 this.dispatchEventToListeners(WebInspector.DOMStorageModel.Events.DOMSto
rageItemUpdated, storageData); | 442 this.dispatchEventToListeners(WebInspector.DOMStorageModel.Events.DOMSto
rageItemUpdated, storageData); |
442 }, | 443 }, |
443 | 444 |
444 /** | 445 /** |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
512 domStorageItemUpdated: function(storageId, key, oldValue, newValue) | 513 domStorageItemUpdated: function(storageId, key, oldValue, newValue) |
513 { | 514 { |
514 this._model._domStorageItemUpdated(storageId, key, oldValue, newValue); | 515 this._model._domStorageItemUpdated(storageId, key, oldValue, newValue); |
515 }, | 516 }, |
516 } | 517 } |
517 | 518 |
518 /** | 519 /** |
519 * @type {WebInspector.DOMStorageModel} | 520 * @type {WebInspector.DOMStorageModel} |
520 */ | 521 */ |
521 WebInspector.domStorageModel = null; | 522 WebInspector.domStorageModel = null; |
OLD | NEW |