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

Side by Side Diff: chrome/common/extensions/docs/examples/api/infobars/sandwichbar/background.js

Issue 20081002: Remove experimental permission from infobars API and moving it to dev channel (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Reverted the app.yaml version change Created 7 years, 5 months 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 /** 1 /**
2 * Handles requests sent by the content script. Shows an infobar. 2 * Handles requests sent by the content script. Shows an infobar.
3 */ 3 */
4 function onRequest(request, sender, sendResponse) { 4 function onRequest(request, sender, sendResponse) {
5 // The number of matches is sent in the request - pass it to the 5 // The number of matches is sent in the request - pass it to the
6 // infobar. 6 // infobar.
7 var url = "infobar.html#" + request.count; 7 var url = "infobar.html#" + request.count;
8 8
9 // Show the infobar on the tab where the request was sent. 9 // Show the infobar on the tab where the request was sent.
10 chrome.experimental.infobars.show({ 10 chrome.infobars.show({
11 tabId: sender.tab.id, 11 tabId: sender.tab.id,
12 path: url 12 path: url
13 }); 13 });
14 14
15 // Return nothing to let the connection be cleaned up. 15 // Return nothing to let the connection be cleaned up.
16 sendResponse({}); 16 sendResponse({});
17 }; 17 };
18 18
19 // Listen for the content script to send a message to the background page. 19 // Listen for the content script to send a message to the background page.
20 chrome.extension.onRequest.addListener(onRequest); 20 chrome.extension.onRequest.addListener(onRequest);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698