toolkit/content/PrivateBrowsingUtils.jsm
author Gregory Szorc <gps@mozilla.com>
Wed, 28 Jan 2015 13:37:00 -0800
branchMOBILE170_2012100914_RELBRANCH
changeset 110535 efe7dc56f512e78244990f3b1fb8dff3b4d69dcd
parent 102995 505d87bc55d4203ef113fbafd014f3feb75fae67
child 109690 8c3b288ab1be6d111609008d66844718fa83e478
permissions -rw-r--r--
Close old release branch MOBILE170_2012100914_RELBRANCH

/* 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/. */

var EXPORTED_SYMBOLS = ["PrivateBrowsingUtils"];

const Ci = Components.interfaces;

var PrivateBrowsingUtils = {
  isWindowPrivate: function pbu_isWindowPrivate(aWindow) {
    return aWindow.QueryInterface(Ci.nsIInterfaceRequestor)
                  .getInterface(Ci.nsIWebNavigation)
                  .QueryInterface(Ci.nsILoadContext)
                  .usePrivateBrowsing;
  }
};