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

Delta Between Two Patch Sets: lib/notificationHelper.js

Issue 29730611: Issue 6511 - Use messaging to register popup notification clicks (Closed)
Left Patch Set: Created March 22, 2018, 2:43 p.m.
Right Patch Set: Updated dependency Created March 23, 2018, 4:37 p.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 | « dependencies ('k') | popup.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-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 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 case "link": 119 case "link":
120 browser.tabs.create({ 120 browser.tabs.create({
121 url: Utils.getDocLink(activeNotification.links[buttonIndex]) 121 url: Utils.getDocLink(activeNotification.links[buttonIndex])
122 }); 122 });
123 break; 123 break;
124 case "open-all": 124 case "open-all":
125 openNotificationLinks(); 125 openNotificationLinks();
126 break; 126 break;
127 case "configure": 127 case "configure":
128 Prefs.notifications_showui = true; 128 Prefs.notifications_showui = true;
129 showOptions(page => 129 showOptions((page, port) =>
kzar 2018/03/23 16:41:52 Due to rebase, from #6476.
130 { 130 {
131 page.sendMessage({ 131 port.postMessage({
132 type: "app.respond", 132 type: "app.respond",
133 action: "focusSection", 133 action: "focusSection",
134 args: ["notifications"] 134 args: ["notifications"]
135 }); 135 });
136 }); 136 });
137 break; 137 break;
138 case "question": 138 case "question":
139 NotificationStorage.triggerQuestionListeners(activeNotification.id, 139 NotificationStorage.triggerQuestionListeners(activeNotification.id,
140 buttonIndex == 0); 140 buttonIndex == 0);
141 NotificationStorage.markAsShown(activeNotification.id); 141 NotificationStorage.markAsShown(activeNotification.id);
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
302 if (activeNotification) 302 if (activeNotification)
303 activeNotification.onClicked(); 303 activeNotification.onClicked();
304 }; 304 };
305 305
306 ext.pages.onLoading.addListener(page => 306 ext.pages.onLoading.addListener(page =>
307 { 307 {
308 NotificationStorage.showNext(stringifyURL(page.url)); 308 NotificationStorage.showNext(stringifyURL(page.url));
309 }); 309 });
310 310
311 NotificationStorage.addShowListener(showNotification); 311 NotificationStorage.addShowListener(showNotification);
LEFTRIGHT

Powered by Google App Engine
This is Rietveld