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

Issue 9965005: Deprecate chrome.extension.sendRequest in favor of sendMessage, with a safer (Closed)

Created:
8 years, 8 months ago by Matt Perry
Modified:
8 years, 5 months ago
Reviewers:
Aaron Boodman
CC:
chromium-reviews, darin-cc_chromium.org, mihaip+watch_chromium.org, brettw-cc_chromium.org
Visibility:
Public.

Description

Deprecate chrome.extension.sendRequest in favor of sendMessage, with a safer API that allows us to close the request port when the receiver doesn't send a response. BUG=120531, 114738 TEST=no Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=130213

Patch Set 1 #

Total comments: 1

Patch Set 2 : pull sendMessage common stuff into chromeHidden.Port #

Patch Set 3 : return.val #

Total comments: 1

Patch Set 4 : sync #

Patch Set 5 : better docs #

Total comments: 13

Patch Set 6 : review #

Patch Set 7 : sync #

Patch Set 8 : sync #

Patch Set 9 : sync #

Unified diffs Side-by-side diffs Delta from patch set Stats (+876 lines, -78 lines) Patch
M chrome/common/extensions/api/extension.json View 1 2 3 4 5 4 chunks +74 lines, -3 lines 0 comments Download
M chrome/common/extensions/api/tabs.json View 1 2 3 4 5 2 chunks +31 lines, -1 line 0 comments Download
M chrome/common/extensions/docs/extension.html View 1 2 3 4 7 chunks +468 lines, -3 lines 0 comments Download
M chrome/common/extensions/docs/samples.json View 1 2 3 4 5 6 7 8 2 chunks +4 lines, -0 lines 0 comments Download
M chrome/common/extensions/docs/tabs.html View 3 chunks +169 lines, -1 line 0 comments Download
M chrome/renderer/resources/extensions/event.js View 1 2 3 4 5 2 chunks +10 lines, -3 lines 0 comments Download
M chrome/renderer/resources/extensions/extension_custom_bindings.js View 1 2 3 4 5 1 chunk +23 lines, -34 lines 0 comments Download
M chrome/renderer/resources/extensions/miscellaneous_bindings.js View 1 2 3 4 5 6 7 8 6 chunks +89 lines, -16 lines 0 comments Download
M chrome/renderer/resources/extensions/tabs_custom_bindings.js View 1 1 chunk +8 lines, -17 lines 0 comments Download

Messages

Total messages: 8 (0 generated)
Matt Perry
http://codereview.chromium.org/9965005/diff/1/chrome/renderer/resources/extensions/extension_custom_bindings.js File chrome/renderer/resources/extensions/extension_custom_bindings.js (right): http://codereview.chromium.org/9965005/diff/1/chrome/renderer/resources/extensions/extension_custom_bindings.js#newcode92 chrome/renderer/resources/extensions/extension_custom_bindings.js:92: if (portName == chromeHidden.kMessageChannel && !responseCallback) { It might ...
8 years, 8 months ago (2012-03-30 04:34:55 UTC) #1
Matt Perry
Hmm.. of course as soon as I sent this, I noticed a flaw: chrome.extension.onMessage.addListener(function(args) { ...
8 years, 8 months ago (2012-03-30 04:55:40 UTC) #2
Matt Perry
OK, this version implements comment 2 from bug 120531. It seems to work pretty well. ...
8 years, 8 months ago (2012-03-30 05:41:39 UTC) #3
Aaron Boodman
http://codereview.chromium.org/9965005/diff/12/chrome/common/extensions/api/extension.json File chrome/common/extensions/api/extension.json (right): http://codereview.chromium.org/9965005/diff/12/chrome/common/extensions/api/extension.json#newcode94 chrome/common/extensions/api/extension.json:94: "description": "Deprecated: Please use sendMessage.", Do you want to ...
8 years, 8 months ago (2012-03-30 21:27:59 UTC) #4
Matt Perry
PTAL I also found who was using Event.dispatch's validationErrors, and fixed that up. http://codereview.chromium.org/9965005/diff/12/chrome/common/extensions/api/extension.json File ...
8 years, 8 months ago (2012-03-30 23:02:48 UTC) #5
Aaron Boodman
LGTM
8 years, 8 months ago (2012-03-30 23:11:10 UTC) #6
bjornstar
On 2012/03/30 23:11:10, Aaron Boodman wrote: > LGTM Can we get some documentation regarding the ...
8 years, 5 months ago (2012-07-09 22:32:26 UTC) #7
Matt Perry
8 years, 5 months ago (2012-07-09 23:29:52 UTC) #8
On 2012/07/09 22:32:26, bjornstar wrote:
> On 2012/03/30 23:11:10, Aaron Boodman wrote:
> > LGTM
> 
> Can we get some documentation regarding the minimum version required for:
> chrome.extension.sendMessage, chrome.extension.onMessage,
> chrome.tabs.sendMessage, and chrome.tabs.onMessage?
> 
> The documentation for chrome.extension.isAllowedIncognitoAccess clearly
states:
> "This function was added in version 12.0.706.0. If you require this function,
> the manifest key minimum_chrome_version can ensure that your extension won't
be
> run in an earlier browser version."

These methods are available in all current versions of Chrome (stable is
currently Chrome 20). It may have been in earlier versions as well, but those
users should be upgraded anyway.

Powered by Google App Engine
This is Rietveld 408576698