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

Delta Between Two Patch Sets: lib/notificationHelper.js

Issue 29339314: Issue 3870 - Rewrite legacy options page to use async messages (Closed)
Left Patch Set: Make use of the subscription.isDownloading property Created April 6, 2016, 9:31 a.m.
Right Patch Set: Avoid another race condition Created April 7, 2016, 1:27 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') | options.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-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 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 break; 128 break;
129 case "open-all": 129 case "open-all":
130 openNotificationLinks(); 130 openNotificationLinks();
131 break; 131 break;
132 case "configure": 132 case "configure":
133 Prefs.notifications_showui = true; 133 Prefs.notifications_showui = true;
134 ext.showOptions(function(page) 134 ext.showOptions(function(page)
135 { 135 {
136 page.sendMessage({ 136 page.sendMessage({
137 type: "app.respond", 137 type: "app.respond",
138 action: "switchToOptionsSection", 138 action: "focusSection",
139 args: ["notifications"] 139 args: ["notifications"]
140 }); 140 });
141 }); 141 });
142 break; 142 break;
143 case "question": 143 case "question":
144 NotificationStorage.triggerQuestionListeners(activeNotification.id, button Index == 0); 144 NotificationStorage.triggerQuestionListeners(activeNotification.id, button Index == 0);
145 NotificationStorage.markAsShown(activeNotification.id); 145 NotificationStorage.markAsShown(activeNotification.id);
146 activeNotification.onClicked(); 146 activeNotification.onClicked();
147 break; 147 break;
148 } 148 }
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 let methods = displayMethods[notificationType] || defaultDisplayMethods; 271 let methods = displayMethods[notificationType] || defaultDisplayMethods;
272 return methods.indexOf(method) > -1; 272 return methods.indexOf(method) > -1;
273 }; 273 };
274 274
275 ext.pages.onLoading.addListener(page => 275 ext.pages.onLoading.addListener(page =>
276 { 276 {
277 NotificationStorage.showNext(stringifyURL(page.url)); 277 NotificationStorage.showNext(stringifyURL(page.url));
278 }); 278 });
279 279
280 NotificationStorage.addShowListener(showNotification); 280 NotificationStorage.addShowListener(showNotification);
LEFTRIGHT

Powered by Google App Engine
This is Rietveld