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

Side by Side Diff: lib/objectTabs.js

Issue 11239001: Use XMLHttpRequest constructor in JS modules (Closed)
Patch Set: Created July 25, 2013, 12:36 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « lib/io.js ('k') | lib/synchronizer.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * This file is part of Adblock Plus <http://adblockplus.org/>, 2 * This file is part of Adblock Plus <http://adblockplus.org/>,
3 * Copyright (C) 2006-2013 Eyeo GmbH 3 * Copyright (C) 2006-2013 Eyeo GmbH
4 * 4 *
5 * Adblock Plus is free software: you can redistribute it and/or modify 5 * Adblock Plus is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 3 as 6 * it under the terms of the GNU General Public License version 3 as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
8 * 8 *
9 * Adblock Plus is distributed in the hope that it will be useful, 9 * Adblock Plus is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 } 148 }
149 149
150 this.delayedShowParams = arguments; 150 this.delayedShowParams = arguments;
151 151
152 if (!this.initializing) 152 if (!this.initializing)
153 { 153 {
154 this.initializing = true; 154 this.initializing = true;
155 155
156 // Load CSS asynchronously 156 // Load CSS asynchronously
157 try { 157 try {
158 let request = Cc["@mozilla.org/xmlextras/xmlhttprequest;1"].createInstan ce(Ci.nsIXMLHttpRequest); 158 let request = new XMLHttpRequest();
159 request.mozBackgroundRequest = true; 159 request.mozBackgroundRequest = true;
160 request.open("GET", "chrome://adblockplus/content/objtabs.css"); 160 request.open("GET", "chrome://adblockplus/content/objtabs.css");
161 request.overrideMimeType("text/plain"); 161 request.overrideMimeType("text/plain");
162 162
163 request.addEventListener("load", processCSSData.bind(this, request), fal se); 163 request.addEventListener("load", processCSSData.bind(this, request), fal se);
164 request.send(null); 164 request.send(null);
165 } 165 }
166 catch (e) 166 catch (e)
167 { 167 {
168 Cu.reportError(e); 168 Cu.reportError(e);
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after
483 event.stopPropagation(); 483 event.stopPropagation();
484 484
485 objTabs.doBlock(); 485 objTabs.doBlock();
486 } 486 }
487 else if (event.type == "mouseover") 487 else if (event.type == "mouseover")
488 objTabs.showTabFor(objTabs.currentElement); 488 objTabs.showTabFor(objTabs.currentElement);
489 else if (event.type == "mouseout") 489 else if (event.type == "mouseout")
490 objTabs.hideTabFor(objTabs.currentElement); 490 objTabs.hideTabFor(objTabs.currentElement);
491 } 491 }
492 exports.objectMouseEventHander = objectMouseEventHander; 492 exports.objectMouseEventHander = objectMouseEventHander;
OLDNEW
« no previous file with comments | « lib/io.js ('k') | lib/synchronizer.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld