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

Delta Between Two Patch Sets: ext/background.js

Issue 29458601: Issue 5315 - Add support for Microsoft Edge (Closed)
Left Patch Set: Use messaging for CSS escaping Created July 17, 2017, 11:49 p.m.
Right Patch Set: Cosmetic changes Created July 28, 2017, 11:02 a.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 | « README.md ('k') | ext/common.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-2017 eyeo GmbH 3 * Copyright (C) 2006-2017 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 599 matching lines...) Expand 10 before | Expand all | Expand 10 after
610 chrome.runtime.onMessage.addListener((message, rawSender, sendResponse) => 610 chrome.runtime.onMessage.addListener((message, rawSender, sendResponse) =>
611 { 611 {
612 let sender = {}; 612 let sender = {};
613 613
614 // Add "page" and "frame" if the message was sent by a content script. 614 // Add "page" and "frame" if the message was sent by a content script.
615 // If sent by popup or the background page itself, there is no "tab". 615 // If sent by popup or the background page itself, there is no "tab".
616 if ("tab" in rawSender) 616 if ("tab" in rawSender)
617 { 617 {
618 sender.page = new Page(rawSender.tab); 618 sender.page = new Page(rawSender.tab);
619 sender.frame = { 619 sender.frame = {
620 id: rawSender.frameId,
620 // In Edge requests from internal extension pages 621 // In Edge requests from internal extension pages
621 // (protocol ms-browser-extension://) do no have a sender URL. 622 // (protocol ms-browser-extension://) do no have a sender URL.
622 url: rawSender.url ? new URL(rawSender.url) : null, 623 url: rawSender.url ? new URL(rawSender.url) : null,
623 get parent() 624 get parent()
624 { 625 {
625 let frames = framesOfTabs.get(rawSender.tab.id); 626 let frames = framesOfTabs.get(rawSender.tab.id);
626 627
627 if (!frames) 628 if (!frames)
628 return null; 629 return null;
629 630
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
738 ext.windows = { 739 ext.windows = {
739 create(createData, callback) 740 create(createData, callback)
740 { 741 {
741 chrome.windows.create(createData, createdWindow => 742 chrome.windows.create(createData, createdWindow =>
742 { 743 {
743 afterTabLoaded(callback)(createdWindow.tabs[0]); 744 afterTabLoaded(callback)(createdWindow.tabs[0]);
744 }); 745 });
745 } 746 }
746 }; 747 };
747 }()); 748 }());
LEFTRIGHT

Powered by Google App Engine
This is Rietveld