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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: chrome/common/extensions/docs/examples/api/messaging/timer/page.js
diff --git a/chrome/common/extensions/docs/examples/api/messaging/timer/page.js b/chrome/common/extensions/docs/examples/api/messaging/timer/page.js
index 4914aabee8ce525edfcfa5de1155cfb2da816f9c..92f8df375fb73a4c9dcdf707ef77bc02d165fd07 100644
--- a/chrome/common/extensions/docs/examples/api/messaging/timer/page.js
+++ b/chrome/common/extensions/docs/examples/api/messaging/timer/page.js
@@ -1,12 +1,10 @@
-if (window == top) {
- chrome.extension.onConnect.addListener(function(port) {
- port.onMessage.addListener(function(msg) {
- port.postMessage({counter: msg.counter+1});
- });
+chrome.extension.onConnect.addListener(function(port) {
+ port.onMessage.addListener(function(msg) {
+ port.postMessage({counter: msg.counter+1});
});
+});
- chrome.extension.onRequest.addListener(
- function(request, sender, sendResponse) {
- sendResponse({counter: request.counter+1});
- });
-}
+chrome.extension.onRequest.addListener(
+ function(request, sender, sendResponse) {
+ sendResponse({counter: request.counter+1});
+ });
« 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