Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(112)

Side by Side Diff: chrome/common/extensions/docs/examples/api/messaging/timer/page.js

Issue 412008: Introduce a new 'all_frames' property to content scripts and (Closed)
Patch Set: responses to comments Created 11 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 if (window == top) { 1 chrome.extension.onConnect.addListener(function(port) {
2 chrome.extension.onConnect.addListener(function(port) { 2 port.onMessage.addListener(function(msg) {
3 port.onMessage.addListener(function(msg) { 3 port.postMessage({counter: msg.counter+1});
4 port.postMessage({counter: msg.counter+1});
5 });
6 }); 4 });
5 });
7 6
8 chrome.extension.onRequest.addListener( 7 chrome.extension.onRequest.addListener(
9 function(request, sender, sendResponse) { 8 function(request, sender, sendResponse) {
10 sendResponse({counter: request.counter+1}); 9 sendResponse({counter: request.counter+1});
11 }); 10 });
12 }
OLDNEW
« no previous file with comments | « chrome/common/extensions/docs/content_scripts.html ('k') | chrome/common/extensions/docs/static/content_scripts.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698