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

Side by Side Diff: lib/appSupport.js

Issue 6228524553732096: Issue 1713 - (Disable/Enable on ...) not showing on FF Mobile (Closed)
Patch Set: Created Dec. 21, 2014, 10:53 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 | « no previous file | 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 <http://adblockplus.org/>, 2 * This file is part of Adblock Plus <http://adblockplus.org/>,
3 * Copyright (C) 2006-2014 Eyeo GmbH 3 * Copyright (C) 2006-2014 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 684 matching lines...) Expand 10 before | Expand all | Expand 10 after
695 695
696 exports.getBrowser = (window) => window.BrowserApp.selectedBrowser; 696 exports.getBrowser = (window) => window.BrowserApp.selectedBrowser;
697 697
698 exports.addTab = (window, url, event) => window.BrowserApp.addTab(url, {sele cted: true}); 698 exports.addTab = (window, url, event) => window.BrowserApp.addTab(url, {sele cted: true});
699 699
700 let BrowserChangeListener = function(window, callback) 700 let BrowserChangeListener = function(window, callback)
701 { 701 {
702 this.window = window; 702 this.window = window;
703 this.callback = callback; 703 this.callback = callback;
704 this.onSelect = this.onSelect.bind(this); 704 this.onSelect = this.onSelect.bind(this);
705 this.attach(); 705 if (window.BrowserApp.deck)
706 this.attach();
707 else
708 window.addEventListener("UIReady", this.attach.bind(this), false);
Wladimir Palant 2014/12/28 11:28:23 This listener needs to be removed when it fires, o
saroyanm 2014/12/28 19:30:14 Done.
706 }; 709 };
707 BrowserChangeListener.prototype = { 710 BrowserChangeListener.prototype = {
708 window: null, 711 window: null,
709 callback: null, 712 callback: null,
710 currentBrowser: null, 713 currentBrowser: null,
711 714
712 setBrowser: function(browser) 715 setBrowser: function(browser)
713 { 716 {
714 if (browser != this.currentBrowser) 717 if (browser != this.currentBrowser)
715 { 718 {
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
947 event.state = {id: require("info").addonID}; 950 event.state = {id: require("info").addonID};
948 browser._contentWindow.dispatchEvent(event); 951 browser._contentWindow.dispatchEvent(event);
949 }); 952 });
950 }); 953 });
951 }, true); 954 }, true);
952 }; 955 };
953 956
954 break; 957 break;
955 } 958 }
956 } 959 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld