framerate.js 933 B

1234567891011121314151617181920212223242526272829303132333435
  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 { Arg, RetVal, generateActorSpec } = require("devtools/shared/protocol");
  6. const framerateSpec = generateActorSpec({
  7. typeName: "framerate",
  8. methods: {
  9. startRecording: {},
  10. stopRecording: {
  11. request: {
  12. beginAt: Arg(0, "nullable:number"),
  13. endAt: Arg(1, "nullable:number")
  14. },
  15. response: { ticks: RetVal("array:number") }
  16. },
  17. cancelRecording: {},
  18. isRecording: {
  19. response: { recording: RetVal("boolean") }
  20. },
  21. getPendingTicks: {
  22. request: {
  23. beginAt: Arg(0, "nullable:number"),
  24. endAt: Arg(1, "nullable:number")
  25. },
  26. response: { ticks: RetVal("array:number") }
  27. }
  28. }
  29. });
  30. exports.framerateSpec = framerateSpec;