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

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

Issue 2851913002: [DevTools] Do not expose agents on Target
Patch Set: storage and tests.js Created 3 years, 8 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
Index: third_party/WebKit/Source/devtools/front_end/resources/DOMStorageModel.js
diff --git a/third_party/WebKit/Source/devtools/front_end/resources/DOMStorageModel.js b/third_party/WebKit/Source/devtools/front_end/resources/DOMStorageModel.js
index 3b18865a4b0822343074bc7ee6d428d6771858df..f90397acc372a44d37841c3848f4ceec24f2a2b4 100644
--- a/third_party/WebKit/Source/devtools/front_end/resources/DOMStorageModel.js
+++ b/third_party/WebKit/Source/devtools/front_end/resources/DOMStorageModel.js
@@ -109,21 +109,22 @@ Resources.DOMStorage.Events = {
Resources.DOMStorageModel = class extends SDK.SDKModel {
/**
* @param {!SDK.Target} target
+ * @param {!Protocol.Dispatcher} dispatcher
*/
- constructor(target) {
- super(target);
+ constructor(target, dispatcher) {
+ super(target, dispatcher);
this._securityOriginManager = target.model(SDK.SecurityOriginManager);
/** @type {!Object.<string, !Resources.DOMStorage>} */
this._storages = {};
- this._agent = target.domstorageAgent();
+ this._agent = dispatcher.domstorageAgent();
+ dispatcher.registerDOMStorageDispatcher(new Resources.DOMStorageDispatcher(this));
}
enable() {
if (this._enabled)
return;
- this.target().registerDOMStorageDispatcher(new Resources.DOMStorageDispatcher(this));
this._securityOriginManager.addEventListener(
SDK.SecurityOriginManager.Events.SecurityOriginAdded, this._securityOriginAdded, this);
this._securityOriginManager.addEventListener(

Powered by Google App Engine
This is Rietveld 408576698