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

Delta Between Two Patch Sets: ext/background.js

Issue 29567798: Noissue - Replace ext.pages.open with tabs.create (Closed) Base URL: https://hg.adblockplus.org/adblockpluschrome/
Left Patch Set: Created Oct. 6, 2017, 3:16 p.m.
Right Patch Set: Remove ext.pages.open implementation Created Oct. 8, 2017, 9:45 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Right: Side by side diff | Download
« no previous file with change/comment | « no previous file | lib/notificationHelper.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
(no file at all)
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-present eyeo GmbH 3 * Copyright (C) 2006-present 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 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 { 114 {
115 chrome.tabs.onUpdated.removeListener(onUpdated); 115 chrome.tabs.onUpdated.removeListener(onUpdated);
116 callback(new Page(openedTab)); 116 callback(new Page(openedTab));
117 } 117 }
118 }; 118 };
119 chrome.tabs.onUpdated.addListener(onUpdated); 119 chrome.tabs.onUpdated.addListener(onUpdated);
120 }; 120 };
121 } 121 }
122 122
123 ext.pages = { 123 ext.pages = {
124 open(url, callback)
125 {
126 chrome.tabs.create({url}, callback && afterTabLoaded(callback));
127 },
128 query(info, callback) 124 query(info, callback)
129 { 125 {
130 let rawInfo = {}; 126 let rawInfo = {};
131 for (let property in info) 127 for (let property in info)
132 { 128 {
133 switch (property) 129 switch (property)
134 { 130 {
135 case "active": 131 case "active":
136 case "lastFocusedWindow": 132 case "lastFocusedWindow":
137 rawInfo[property] = info[property]; 133 rawInfo[property] = info[property];
(...skipping 559 matching lines...) Expand 10 before | Expand all | Expand 10 after
697 ext.windows = { 693 ext.windows = {
698 create(createData, callback) 694 create(createData, callback)
699 { 695 {
700 chrome.windows.create(createData, createdWindow => 696 chrome.windows.create(createData, createdWindow =>
701 { 697 {
702 afterTabLoaded(callback)(createdWindow.tabs[0]); 698 afterTabLoaded(callback)(createdWindow.tabs[0]);
703 }); 699 });
704 } 700 }
705 }; 701 };
706 }()); 702 }());
LEFTRIGHT

Powered by Google App Engine
This is Rietveld