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

Side by Side Diff: chrome/test/data/extensions/api_test/rtc_private/events/background.js

Issue 10919086: Wired chrome.rtcPrivate API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 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
(Empty)
1 // Copyright (c) 2012 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
5 var action_counter = 0;
6
7 chrome.rtcPrivate.onLaunch.addListener(function(launchData) {
8 if(!launchData) {
9 console.log('HANDLER: got default action');
10 action_counter++;
11 return;
12 }
13
14 var action = launchData.intent.action;
15 if (action == 'chat' || action == 'video' || action == 'voice') {
16 var data = launchData.intent.data;
17 var type = launchData.intent.type;
18 console.log('HANDLER: Received ' + action + ', data = ' + data);
19 action_counter++;
20 } else {
21 console.log('HANDLER: unknown action - ' + action);
22 chrome.test.fail('HANDLER: No content changed!');
23 return;
24 }
25 });
26
27 chrome.extension.onMessage.addListener(
28 function(request, sender, sendResponse) {
29 if (request.message == "getIntentsCount")
30 sendResponse({"count": action_counter});
31 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698