1 // Copyright 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.
5 chrome
.runtime
.onMessageExternal
.addListener(
6 function(message
, sender
, sendResponse
) {
7 if (message
[0] == "getStream") {
8 chrome
.desktopCapture
.chooseDesktopMedia(
12 sendResponse({"id": id
});
15 } else if (message
[0] == "getStreamNoWait") {
16 chrome
.desktopCapture
.chooseDesktopMedia(
18 sender
.tab
, function() {});
21 sendResponse({"error": "invalid message"});