summaryrefslogtreecommitdiffstats
path: root/devtools/shared/fronts/layout.js
blob: 5a1a6185d3692d684ff65b9703a0718a8120b889 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/* 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 { FrontClassWithSpec } = require("devtools/shared/protocol");
const { gridSpec, layoutSpec } = require("devtools/shared/specs/layout");

const GridFront = FrontClassWithSpec(gridSpec, {
  form: function (form, detail) {
    if (detail === "actorid") {
      this.actorID = form;
      return;
    }
    this._form = form;
  },

  /**
   * Getter for the grid fragments data.
   */
  get gridFragments() {
    return this._form.gridFragments;
  }
});

const LayoutFront = FrontClassWithSpec(layoutSpec, {});

exports.GridFront = GridFront;
exports.LayoutFront = LayoutFront;