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

Delta Between Two Patch Sets: background.js

Issue 6528746257383424: Issue 1708 - Integrate first-run page changes in Chrome/Opera/Safari (Closed)
Left Patch Set: Rebased patch Created Dec. 18, 2014, 10:12 p.m.
Right Patch Set: Rebased Created Dec. 19, 2014, 8:09 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 | « .hgsubstate ('k') | chrome/ext/background.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 <http://adblockplus.org/>, 2 * This file is part of Adblock Plus <http://adblockplus.org/>,
3 * Copyright (C) 2006-2014 Eyeo GmbH 3 * Copyright (C) 2006-2014 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 549 matching lines...) Expand 10 before | Expand all | Expand 10 after
560 break; 560 break;
561 case "forward": 561 case "forward":
562 if (sender.page) 562 if (sender.page)
563 { 563 {
564 sender.page.sendMessage(msg.payload, sendResponse); 564 sender.page.sendMessage(msg.payload, sendResponse);
565 // Return true to indicate that we want to call 565 // Return true to indicate that we want to call
566 // sendResponse asynchronously 566 // sendResponse asynchronously
567 return true; 567 return true;
568 } 568 }
569 break; 569 break;
570 default:
571 sendResponse({});
572 break;
573 } 570 }
574 }); 571 });
575 572
576 // update icon when page changes location 573 // update icon when page changes location
577 ext.pages.onLoading.addListener(function(page) 574 ext.pages.onLoading.addListener(function(page)
578 { 575 {
579 page.sendMessage({type: "clickhide-deactivate"}); 576 page.sendMessage({type: "clickhide-deactivate"});
580 refreshIconAndContextMenu(page); 577 refreshIconAndContextMenu(page);
581 }); 578 });
582 579
583 setTimeout(function() 580 setTimeout(function()
584 { 581 {
585 var notificationToShow = Notification.getNextToShow(); 582 var notificationToShow = Notification.getNextToShow();
586 if (notificationToShow) 583 if (notificationToShow)
587 showNotification(notificationToShow); 584 showNotification(notificationToShow);
588 }, 3 * 60 * 1000); 585 }, 3 * 60 * 1000);
LEFTRIGHT

Powered by Google App Engine
This is Rietveld