~robru/unity-firefox-extension/quantal-sru-candidate

« back to all changes in this revision

Viewing changes to unity-firefox-extension/content/chromeless.js

  • Committer: Ken VanDine
  • Date: 2012-09-11 20:20:06 UTC
  • mfrom: (83.37.51)
  • Revision ID: ken.vandine@canonical.com-20120911202006-cnidpkmvipd1m901
Tags: 2.3-0quantal1
releasing version 2.3-0quantal1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
 
2
 
 
3
var Cu = Components.utils;
 
4
var Ci = Components.interfaces;
 
5
var Cc = Components.classes;
 
6
var Cr = Components.results;
 
7
var Cm = Components.manager;
 
8
 
 
9
var sss = Cc["@mozilla.org/content/style-sheet-service;1"].getService(Ci.nsIStyleSheetService);
 
10
var ios = Cc["@mozilla.org/network/io-service;1"].getService(Ci.nsIIOService);
 
11
 
 
12
var Chromeless = {
 
13
    _activated: false,
 
14
 
 
15
    activate: function () {
 
16
        var uri = ios.newURI("chrome://unity/skin/chromeless.css", null, null);
 
17
        sss.loadAndRegisterSheet(uri, sss.USER_SHEET);
 
18
 
 
19
        Chromeless._activated = true;
 
20
    },
 
21
 
 
22
    deactivate: function () {
 
23
        if (Chromeless._activated) {
 
24
            var uri = ios.newURI("chrome://unity/skin/chromeless.css", null, null);
 
25
            sss.unregisterSheet(uri, sss.USER_SHEET);
 
26
 
 
27
            Chromeless._activated = false;
 
28
        }
 
29
    }
 
30
}
 
31
 
 
32
var EXPORTED_SYMBOLS = [ "Chromeless" ];