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

Side by Side Diff: chrome/test/data/devtools/extensions/devtools_messaging/background.js

Issue 11745015: Update references to the extension messaging APIs to point to the "runtime" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 11 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
1 function onRequest(request, sender, callback) { 5 function onRequest(request, sender, callback) {
2 var response = JSON.stringify(request); 6 var response = JSON.stringify(request);
3 callback("onRequest callback: " + response); 7 callback("onRequest callback: " + response);
4 } 8 }
5 9
6 chrome.extension.onRequest.addListener(onRequest); 10 chrome.extension.onRequest.addListener(onRequest);
7 11
8 function onMessage(port, message) { 12 function onMessage(port, message) {
9 port.postMessage("port.onMessage: " + message); 13 port.postMessage("port.onMessage: " + message);
10 } 14 }
11 15
12 function onConnect(port) { 16 function onConnect(port) {
13 port.onMessage.addListener(onMessage.bind(null, port)); 17 port.onMessage.addListener(onMessage.bind(null, port));
14 } 18 }
15 19
16 chrome.extension.onConnect.addListener(onConnect); 20 chrome.runtime.onConnect.addListener(onConnect);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698