summaryrefslogtreecommitdiff
path: root/devtools/shared/fronts/storage.js
diff options
context:
space:
mode:
Diffstat (limited to 'devtools/shared/fronts/storage.js')
-rw-r--r--devtools/shared/fronts/storage.js32
1 files changed, 32 insertions, 0 deletions
diff --git a/devtools/shared/fronts/storage.js b/devtools/shared/fronts/storage.js
new file mode 100644
index 0000000000..304e57c6fe
--- /dev/null
+++ b/devtools/shared/fronts/storage.js
@@ -0,0 +1,32 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+"use strict";
+
+const protocol = require("devtools/shared/protocol");
+const specs = require("devtools/shared/specs/storage");
+
+for (let childSpec of Object.values(specs.childSpecs)) {
+ protocol.FrontClassWithSpec(childSpec, {
+ form(form, detail) {
+ if (detail === "actorid") {
+ this.actorID = form;
+ return null;
+ }
+
+ this.actorID = form.actor;
+ this.hosts = form.hosts;
+ return null;
+ }
+ });
+}
+
+const StorageFront = protocol.FrontClassWithSpec(specs.storageSpec, {
+ initialize(client, tabForm) {
+ protocol.Front.prototype.initialize.call(this, client);
+ this.actorID = tabForm.storageActor;
+ this.manage(this);
+ }
+});
+
+exports.StorageFront = StorageFront;