author Robert Strong <>
Wed, 19 Oct 2016 13:27:01 -0700
changeset 348675 4d6033fadbc589a5f6170803e6af65ed8de5c96d
parent 318605 b04361fcbafcb20cfab95999b6a7b37633dd3bc7
child 351372 4eb5775fd334887121a7a779a27e6727acdcb25f
permissions -rw-r--r--
Client code for Bug 1309125 - Allow configuration of the download throttle via the update.xml. r=mhowell, a=rkothari

/* -*- Mode: C++; c-basic-offset: 2; indent-tabs-mode: nil; tab-width: 8 -*- */
/* 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 */

include protocol PBrowser;
include protocol PContent;

include "mozilla/GfxMessageUtils.h";

using nsIntRect from "nsRect.h";
using mozilla::dom::TabId from "mozilla/dom/ipc/IdType.h";

namespace mozilla {
namespace dom {

struct ScreenDetails {
  uint32_t id;
  nsIntRect rect;
  nsIntRect rectDisplayPix;
  nsIntRect availRect;
  nsIntRect availRectDisplayPix;
  int32_t pixelDepth;
  int32_t colorDepth;
  double contentsScaleFactor;

prio(normal upto high) sync protocol PScreenManager
  manager PContent;

    prio(high) sync Refresh()
      returns (uint32_t numberOfScreens,
               float systemDefaultScale,
               bool success);

    prio(high) sync ScreenRefresh(uint32_t aId)
      returns (ScreenDetails screen,
               bool success);

    prio(high) sync GetPrimaryScreen()
      returns (ScreenDetails screen,
               bool success);

    prio(high) sync ScreenForRect(int32_t aLeft,
                       int32_t aTop,
                       int32_t aWidth,
                       int32_t aHeight)
      returns (ScreenDetails screen,
               bool success);

    prio(high) sync ScreenForBrowser(TabId aTabId)
      returns (ScreenDetails screen,
               bool success);

    async __delete__();

} // namespace dom
} // namespace mozilla