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

Unified Diff: chrome/ext/common.js

Issue 6276084194607104: Issue 338 - Updated minimum version to Chrome 28 and got rid of legacy compatibility code (Closed)
Patch Set: Created April 16, 2014, 9:54 a.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
Index: chrome/ext/common.js
===================================================================
--- a/chrome/ext/common.js
+++ b/chrome/ext/common.js
@@ -19,37 +19,13 @@
{
/* Message passing */
- var sendMessage;
- if ("runtime" in chrome && "sendMessage" in chrome.runtime)
- sendMessage = chrome.runtime.sendMessage;
- else if ("sendMessage" in chrome.extension)
- sendMessage = chrome.extension.sendMessage;
- else
- sendMessage = chrome.extension.sendRequest;
-
- ext._setupMessageListener = function(wrapSender)
- {
- var onMessage;
- if ("runtime" in chrome && "onMessage" in chrome.runtime)
- onMessage = chrome.runtime.onMessage;
- else if ("onMessage" in chrome.extension)
- onMessage = chrome.extension.onMessage;
- else
- onMessage = chrome.extension.onRequest;
-
- onMessage.addListener(function(message, sender, sendResponse)
- {
- return ext.onMessage._dispatch(message, wrapSender(sender), sendResponse);
- });
- };
-
ext.onMessage = new ext._EventTarget();
/* Background page */
ext.backgroundPage = {
- sendMessage: sendMessage,
+ sendMessage: chrome.runtime.sendMessage,
getWindow: function()
{
return chrome.extension.getBackgroundPage();
« no previous file with comments | « chrome/ext/background.js ('k') | chrome/ext/content.js » ('j') | popupBlocker.js » ('J')

Powered by Google App Engine
This is Rietveld