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

Side by Side Diff: chrome/test/data/extensions/samples/print_browser_action/background.html

Issue 264046: Update browser actions api to be like new design doc. (Closed)
Patch Set: rebase Created 11 years, 2 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 <html> 1 <html>
2 <head> 2 <head>
3 <script> 3 <script>
4 // Called when the user clicks on the browser action. 4 // Called when the user clicks on the browser action.
5 chrome.browserAction.onClicked.addListener(function(windowId) { 5 chrome.browserAction.onClicked.addListener(function(tab) {
6 chrome.tabs.getSelected(windowId, function(tab) { 6 var action_url = "javascript:window.print();";
7 var action_url = "javascript:window.print();"; 7 chrome.tabs.update(tab.id, {url: action_url});
8 chrome.tabs.update(tab.id, {url: action_url});
9 });
10 }); 8 });
11 </script> 9 </script>
12 </head> 10 </head>
13 </html> 11 </html>
14 12
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698