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

Delta Between Two Patch Sets: background.js

Issue 29338734: Issue 3839 - Adapt for Prefs event changes (Closed)
Left Patch Set: Simplified FilterNotifier logic Created March 22, 2016, 6:54 a.m.
Right Patch Set: Addresed comments Created March 22, 2016, 2:22 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « no previous file | messageResponder.js » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
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-2016 Eyeo GmbH 3 * Copyright (C) 2006-2016 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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 } 50 }
51 }; 51 };
52 52
53 function Notifier() 53 function Notifier()
54 { 54 {
55 this._eventEmitter = new EventEmitter(); 55 this._eventEmitter = new EventEmitter();
56 } 56 }
57 Notifier.prototype = { 57 Notifier.prototype = {
58 addListener: function(listener) 58 addListener: function(listener)
59 { 59 {
60 var listeners = this._eventEmitter[""]; 60 var listeners = this._eventEmitter._listeners[""];
61 if (!listeners || listener.indexOf(listener) == -1) 61 if (!listeners || listener.indexOf(listener) == -1)
62 this._eventEmitter.on("", listener); 62 this._eventEmitter.on("", listener);
63 }, 63 },
64 removeListener: function(listener) 64 removeListener: function(listener)
65 { 65 {
66 this._eventEmitter.off("", listener); 66 this._eventEmitter.off("", listener);
67 }, 67 },
68 triggerListeners: function() 68 triggerListeners: function()
69 { 69 {
70 var args = Array.prototype.slice.apply(arguments); 70 var args = Array.prototype.slice.apply(arguments);
(...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after
492 492
493 if (params.safariContentBlocker) 493 if (params.safariContentBlocker)
494 { 494 {
495 global.safari = { 495 global.safari = {
496 extension: { 496 extension: {
497 setContentBlocker: function() {} 497 setContentBlocker: function() {}
498 } 498 }
499 }; 499 };
500 } 500 }
501 })(this); 501 })(this);
LEFTRIGHT

Powered by Google App Engine
This is Rietveld