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

Side by Side Diff: lib/requestNotifier.js

Issue 29329779: Issue 3258 - Blockable items: restore item flashing functionality (Closed)
Patch Set: Better handling of dead objects Created Nov. 5, 2015, 11:06 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
« lib/child/flasher.js ('K') | « lib/child/requestNotifier.js ('k') | no next file » | 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 <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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 */ 115 */
116 notifyListener: function(entry) 116 notifyListener: function(entry)
117 { 117 {
118 this.listener.call(this.listenerObj, entry, this.scanComplete); 118 this.listener.call(this.listenerObj, entry, this.scanComplete);
119 }, 119 },
120 120
121 onComplete: function() 121 onComplete: function()
122 { 122 {
123 this.scanComplete = true; 123 this.scanComplete = true;
124 this.notifyListener(null); 124 this.notifyListener(null);
125 },
126
127 /**
128 * Makes the nodes associated with the given requests blink.
129 * @param {number[]} requests list of request IDs that were previously
130 * reported by this notifier.
131 * @param {Boolean} scrollToItem if true, scroll to first node
Thomas Greiner 2015/11/24 12:15:42 Detail: Parameter type names are inconsistently ca
Wladimir Palant 2015/11/25 19:06:38 Done.
132 */
133 flashNodes: function(requests, scrollToItem)
134 {
135 if (!requests)
136 requests = [];
137
138 messageManager.broadcastAsyncMessage("AdblockPlus:FlashNodes", {
139 notifierID: this.id,
140 requests,
141 scrollToItem
142 });
125 } 143 }
126 }; 144 };
127 145
128 RequestNotifier.storeSelection = function(/**Window*/ wnd, /**String*/ selection ) 146 RequestNotifier.storeSelection = function(/**Window*/ wnd, /**String*/ selection )
129 { 147 {
130 windowSelection.set(wnd.document, selection); 148 windowSelection.set(wnd.document, selection);
131 }; 149 };
132 RequestNotifier.getSelection = function(/**Window*/ wnd) /**String*/ 150 RequestNotifier.getSelection = function(/**Window*/ wnd) /**String*/
133 { 151 {
134 if (windowSelection.has(wnd.document)) 152 if (windowSelection.has(wnd.document))
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 node = node.parentNode; 205 node = node.parentNode;
188 } 206 }
189 else 207 else
190 { 208 {
191 node = null; 209 node = null;
192 } 210 }
193 } 211 }
194 212
195 return null; 213 return null;
196 }; 214 };
OLDNEW
« lib/child/flasher.js ('K') | « lib/child/requestNotifier.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld