emulation.js 767 B

12345678910111213141516171819202122232425
  1. /* This Source Code Form is subject to the terms of the Mozilla Public
  2. * License, v. 2.0. If a copy of the MPL was not distributed with this
  3. * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
  4. "use strict";
  5. const { Front, FrontClassWithSpec } = require("devtools/shared/protocol");
  6. const { emulationSpec } = require("devtools/shared/specs/emulation");
  7. /**
  8. * The corresponding Front object for the EmulationActor.
  9. */
  10. const EmulationFront = FrontClassWithSpec(emulationSpec, {
  11. initialize: function (client, form) {
  12. Front.prototype.initialize.call(this, client);
  13. this.actorID = form.emulationActor;
  14. this.manage(this);
  15. },
  16. destroy: function () {
  17. Front.prototype.destroy.call(this);
  18. },
  19. });
  20. exports.EmulationFront = EmulationFront;