Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: lib/windowObserver.js

Issue 5430129207541760: Issue 1358 - Publish build tools under the MPL 2.0 license (Closed)
Patch Set: Created Sept. 11, 2014, 3:41 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « lib/prefs.js ('k') | localeTools.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/windowObserver.js
===================================================================
--- a/lib/windowObserver.js
+++ b/lib/windowObserver.js
@@ -1,24 +1,11 @@
-/*
- * This file is part of the Adblock Plus build tools,
- * Copyright (C) 2006-2014 Eyeo GmbH
- *
- * Adblock Plus is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 3 as
- * published by the Free Software Foundation.
- *
- * Adblock Plus is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>.
- */
+/* 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/. */
Cu.import("resource://gre/modules/Services.jsm");
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
exports.WindowObserver = WindowObserver;
/**
* This class will call listener's method applyToWindow() for all new chrome
@@ -43,17 +30,17 @@ function WindowObserver(listener, when)
// Check if there are any windows that we missed
let eAll = Services.ww.getWindowEnumerator();
while (eAll.hasMoreElements())
{
let element = eAll.getNext();
if (windows.indexOf(element) < 0)
windows.push(element);
}
-
+
for (let i = 0; i < windows.length; i++)
{
let window = windows[i].QueryInterface(Ci.nsIDOMWindow);
if (when == "start" || window.document.readyState == "complete")
this._listener.applyToWindow(window);
else
this.observe(window, "chrome-document-global-created", null);
}
« no previous file with comments | « lib/prefs.js ('k') | localeTools.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld