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

Unified Diff: chrome/background.js

Issue 4549521954570240: Added backwards compatibility for Chrome's old messaging API (Closed)
Patch Set: Handled case when chrome.runtime isn't present Created Nov. 17, 2013, 1:21 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/common.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/background.js
===================================================================
--- a/chrome/background.js
+++ b/chrome/background.js
@@ -194,6 +194,8 @@
/* Tabs */
+ var sendMessage = chrome.tabs.sendMessage || chrome.tabs.sendRequest;
+
var PageAction = function(tabId)
{
this._tabId = tabId;
@@ -240,7 +242,7 @@
},
sendMessage: function(message, responseCallback)
{
- chrome.tabs.sendMessage(this._id, message, responseCallback);
+ sendMessage(this._id, message, responseCallback);
}
};
« no previous file with comments | « no previous file | chrome/common.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld