OLD | NEW |
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 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
197 | 197 |
198 var BrowserAction = function(tabId) | 198 var BrowserAction = function(tabId) |
199 { | 199 { |
200 this._tabId = tabId; | 200 this._tabId = tabId; |
201 }; | 201 }; |
202 BrowserAction.prototype = { | 202 BrowserAction.prototype = { |
203 setIcon: function(path) | 203 setIcon: function(path) |
204 { | 204 { |
205 chrome.browserAction.setIcon({tabId: this._tabId, path: path}); | 205 chrome.browserAction.setIcon({tabId: this._tabId, path: path}); |
206 }, | 206 }, |
207 setTitle: function(title) | |
208 { | |
209 chrome.browserAction.setTitle({tabId: this._tabId, title: title}); | |
210 }, | |
211 setBadge: function(badge) | 207 setBadge: function(badge) |
212 { | 208 { |
213 if (!badge) | 209 if (!badge) |
214 { | 210 { |
215 chrome.browserAction.setBadgeText({ | 211 chrome.browserAction.setBadgeText({ |
216 tabId: this._tabId, | 212 tabId: this._tabId, |
217 text: "" | 213 text: "" |
218 }); | 214 }); |
219 return; | 215 return; |
220 } | 216 } |
(...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
569 if (isContextMenuHidden) | 565 if (isContextMenuHidden) |
570 return; | 566 return; |
571 | 567 |
572 chrome.contextMenus.removeAll(); | 568 chrome.contextMenus.removeAll(); |
573 isContextMenuHidden = true; | 569 isContextMenuHidden = true; |
574 } | 570 } |
575 }; | 571 }; |
576 | 572 |
577 ext.onMessage = new BackgroundMessageEventTarget(); | 573 ext.onMessage = new BackgroundMessageEventTarget(); |
578 })(); | 574 })(); |
OLD | NEW |