Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1521)

Unified Diff: Source/devtools/front_end/DOMStorageItemsView.js

Issue 22346003: DevTools: DOMStorage should notify the view about storage modifications instead of DOMStorageModel (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Review comments addressed! Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/devtools/front_end/DOMStorage.js ('k') | Source/devtools/front_end/ResourcesPanel.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/DOMStorageItemsView.js
diff --git a/Source/devtools/front_end/DOMStorageItemsView.js b/Source/devtools/front_end/DOMStorageItemsView.js
index 5d94705b053e1331002de02789d492b814eaae3b..908ba8bcb2004ff8d7a3841612b7e213dca985d9 100644
--- a/Source/devtools/front_end/DOMStorageItemsView.js
+++ b/Source/devtools/front_end/DOMStorageItemsView.js
@@ -28,12 +28,11 @@
* @constructor
* @extends {WebInspector.View}
*/
-WebInspector.DOMStorageItemsView = function(domStorage, domStorageModel)
+WebInspector.DOMStorageItemsView = function(domStorage)
{
WebInspector.View.call(this);
this.domStorage = domStorage;
- this.domStorageModel = domStorageModel;
this.element.addStyleClass("storage-view");
this.element.addStyleClass("table");
@@ -45,10 +44,10 @@ WebInspector.DOMStorageItemsView = function(domStorage, domStorageModel)
this.refreshButton = new WebInspector.StatusBarButton(WebInspector.UIString("Refresh"), "refresh-storage-status-bar-item");
this.refreshButton.addEventListener("click", this._refreshButtonClicked, this);
- this.domStorageModel.addEventListener(WebInspector.DOMStorageModel.Events.DOMStorageItemsCleared, this._domStorageItemsCleared, this);
- this.domStorageModel.addEventListener(WebInspector.DOMStorageModel.Events.DOMStorageItemRemoved, this._domStorageItemRemoved, this);
- this.domStorageModel.addEventListener(WebInspector.DOMStorageModel.Events.DOMStorageItemAdded, this._domStorageItemAdded, this);
- this.domStorageModel.addEventListener(WebInspector.DOMStorageModel.Events.DOMStorageItemUpdated, this._domStorageItemUpdated, this);
+ this.domStorage.addEventListener(WebInspector.DOMStorage.Events.DOMStorageItemsCleared, this._domStorageItemsCleared, this);
+ this.domStorage.addEventListener(WebInspector.DOMStorage.Events.DOMStorageItemRemoved, this._domStorageItemRemoved, this);
+ this.domStorage.addEventListener(WebInspector.DOMStorage.Events.DOMStorageItemAdded, this._domStorageItemAdded, this);
+ this.domStorage.addEventListener(WebInspector.DOMStorage.Events.DOMStorageItemUpdated, this._domStorageItemUpdated, this);
}
WebInspector.DOMStorageItemsView.prototype = {
@@ -144,7 +143,7 @@ WebInspector.DOMStorageItemsView.prototype = {
if (children[i].data.key === storageData.key)
return;
- var childNode = new WebInspector.DataGridNode({key: storageData.key, value: storageData.newValue}, false);
+ var childNode = new WebInspector.DataGridNode({key: storageData.key, value: storageData.value}, false);
rootNode.insertChild(childNode, children.length - 1);
},
@@ -171,8 +170,8 @@ WebInspector.DOMStorageItemsView.prototype = {
return;
}
keyFound = true;
- if (childNode.data.value !== storageData.newValue) {
- childNode.data.value = storageData.newValue;
+ if (childNode.data.value !== storageData.value) {
+ childNode.data.value = storageData.value;
childNode.refresh();
childNode.select();
childNode.reveal();
« no previous file with comments | « Source/devtools/front_end/DOMStorage.js ('k') | Source/devtools/front_end/ResourcesPanel.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698