OLD | NEW |
1 /* | 1 /* |
2 * This file is part of Adblock Plus <https://adblockplus.org/>, | 2 * This file is part of Adblock Plus <https://adblockplus.org/>, |
3 * Copyright (C) 2006-2015 Eyeo GmbH | 3 * Copyright (C) 2006-2015 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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 securityInfo: null, | 101 securityInfo: null, |
102 notificationCallbacks: null, | 102 notificationCallbacks: null, |
103 loadFlags: 0, | 103 loadFlags: 0, |
104 loadGroup: null, | 104 loadGroup: null, |
105 name: null, | 105 name: null, |
106 status: Cr.NS_OK, | 106 status: Cr.NS_OK, |
107 | 107 |
108 asyncOpen: function(listener, context) | 108 asyncOpen: function(listener, context) |
109 { | 109 { |
110 let stream = this.open(); | 110 let stream = this.open(); |
111 Utils.runAsync(function() | 111 Utils.runAsync(() => |
112 { | 112 { |
113 try { | 113 try { |
114 listener.onStartRequest(this, context); | 114 listener.onStartRequest(this, context); |
115 } catch(e) {} | 115 } catch(e) {} |
116 try { | 116 try { |
117 listener.onDataAvailable(this, context, stream, 0, stream.available()); | 117 listener.onDataAvailable(this, context, stream, 0, stream.available()); |
118 } catch(e) {} | 118 } catch(e) {} |
119 try { | 119 try { |
120 listener.onStopRequest(this, context, Cr.NS_OK); | 120 listener.onStopRequest(this, context, Cr.NS_OK); |
121 } catch(e) {} | 121 } catch(e) {} |
122 }, this); | 122 }); |
123 }, | 123 }, |
124 | 124 |
125 open: function() | 125 open: function() |
126 { | 126 { |
127 let {Policy} = require("contentPolicy"); | 127 let {Policy} = require("contentPolicy"); |
128 let {ElemHide} = require("elemHide"); | 128 let {ElemHide} = require("elemHide"); |
129 | 129 |
130 // This dummy binding below won't have any effect on the element. For | 130 // This dummy binding below won't have any effect on the element. For |
131 // elements that should be hidden however we don't return any binding at | 131 // elements that should be hidden however we don't return any binding at |
132 // all, this makes Gecko stop constructing the node - it cannot be shown. | 132 // all, this makes Gecko stop constructing the node - it cannot be shown. |
(...skipping 22 matching lines...) Expand all Loading... |
155 { | 155 { |
156 throw Cr.NS_ERROR_NOT_IMPLEMENTED; | 156 throw Cr.NS_ERROR_NOT_IMPLEMENTED; |
157 }, | 157 }, |
158 resume: function() | 158 resume: function() |
159 { | 159 { |
160 throw Cr.NS_ERROR_NOT_IMPLEMENTED; | 160 throw Cr.NS_ERROR_NOT_IMPLEMENTED; |
161 }, | 161 }, |
162 | 162 |
163 QueryInterface: XPCOMUtils.generateQI([Ci.nsIChannel, Ci.nsIRequest]) | 163 QueryInterface: XPCOMUtils.generateQI([Ci.nsIChannel, Ci.nsIRequest]) |
164 }; | 164 }; |
OLD | NEW |