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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/resources/DOMStorageModel.js

Issue 2543633009: [Devtools] Template fromTarget() function calls to model (Closed)
Patch Set: fix Created 4 years 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 unified diff | Download patch
OLDNEW
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 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 /** @type {!Object.<string, !Resources.DOMStorage>} */ 114 /** @type {!Object.<string, !Resources.DOMStorage>} */
115 this._storages = {}; 115 this._storages = {};
116 this._agent = target.domstorageAgent(); 116 this._agent = target.domstorageAgent();
117 } 117 }
118 118
119 /** 119 /**
120 * @param {!SDK.Target} target 120 * @param {!SDK.Target} target
121 * @return {!Resources.DOMStorageModel} 121 * @return {!Resources.DOMStorageModel}
122 */ 122 */
123 static fromTarget(target) { 123 static fromTarget(target) {
124 var model = /** @type {?Resources.DOMStorageModel} */ (target.model(Resource s.DOMStorageModel)); 124 var model = target.model(Resources.DOMStorageModel);
125 if (!model) 125 if (!model)
126 model = new Resources.DOMStorageModel(target, SDK.SecurityOriginManager.fr omTarget(target)); 126 model = new Resources.DOMStorageModel(target, SDK.SecurityOriginManager.fr omTarget(target));
127 127
128 return model; 128 return model;
129 } 129 }
130 130
131 enable() { 131 enable() {
132 if (this._enabled) 132 if (this._enabled)
133 return; 133 return;
134 134
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
336 * @param {string} key 336 * @param {string} key
337 * @param {string} oldValue 337 * @param {string} oldValue
338 * @param {string} value 338 * @param {string} value
339 */ 339 */
340 domStorageItemUpdated(storageId, key, oldValue, value) { 340 domStorageItemUpdated(storageId, key, oldValue, value) {
341 this._model._domStorageItemUpdated(storageId, key, oldValue, value); 341 this._model._domStorageItemUpdated(storageId, key, oldValue, value);
342 } 342 }
343 }; 343 };
344 344
345 Resources.DOMStorageModel._symbol = Symbol('DomStorage'); 345 Resources.DOMStorageModel._symbol = Symbol('DomStorage');
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698