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

Side by Side Diff: chrome/ext/background.js

Issue 29349240: Issue 4218 - Browser icons for newer Chrome + Edge (Closed)
Patch Set: Created Aug. 9, 2016, 11:10 a.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 | chrome/icons/abp-16.png » ('j') | lib/icon.js » ('J')
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-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 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 this._changes = null; 176 this._changes = null;
177 }; 177 };
178 BrowserAction.prototype = { 178 BrowserAction.prototype = {
179 _applyChanges: function() 179 _applyChanges: function()
180 { 180 {
181 if ("iconPath" in this._changes) 181 if ("iconPath" in this._changes)
182 { 182 {
183 chrome.browserAction.setIcon({ 183 chrome.browserAction.setIcon({
184 tabId: this._tabId, 184 tabId: this._tabId,
185 path: { 185 path: {
186 16: this._changes.iconPath.replace("$size", "16"),
186 19: this._changes.iconPath.replace("$size", "19"), 187 19: this._changes.iconPath.replace("$size", "19"),
187 38: this._changes.iconPath.replace("$size", "38") 188 20: this._changes.iconPath.replace("$size", "20"),
189 32: this._changes.iconPath.replace("$size", "32"),
190 38: this._changes.iconPath.replace("$size", "38"),
191 40: this._changes.iconPath.replace("$size", "40")
188 } 192 }
189 }); 193 });
190 } 194 }
191 195
192 if ("badgeText" in this._changes) 196 if ("badgeText" in this._changes)
193 { 197 {
194 chrome.browserAction.setBadgeText({ 198 chrome.browserAction.setBadgeText({
195 tabId: this._tabId, 199 tabId: this._tabId,
196 text: this._changes.badgeText 200 text: this._changes.badgeText
197 }); 201 });
(...skipping 393 matching lines...) Expand 10 before | Expand all | Expand 10 after
591 ext.windows = { 595 ext.windows = {
592 create: function(createData, callback) 596 create: function(createData, callback)
593 { 597 {
594 chrome.windows.create(createData, function(createdWindow) 598 chrome.windows.create(createData, function(createdWindow)
595 { 599 {
596 afterTabLoaded(callback)(createdWindow.tabs[0]); 600 afterTabLoaded(callback)(createdWindow.tabs[0]);
597 }); 601 });
598 } 602 }
599 }; 603 };
600 })(); 604 })();
OLDNEW
« no previous file with comments | « no previous file | chrome/icons/abp-16.png » ('j') | lib/icon.js » ('J')

Powered by Google App Engine
This is Rietveld