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

Unified Diff: chrome/common/extensions/docs/examples/api/desktopCapture/background.js

Issue 529293002: Fix DesktopMediaPickerViews to handle background parent_web_contents (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2125
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
Index: chrome/common/extensions/docs/examples/api/desktopCapture/background.js
diff --git a/chrome/common/extensions/docs/examples/api/desktopCapture/background.js b/chrome/common/extensions/docs/examples/api/desktopCapture/background.js
index 6d17ac4b76650954c8b446c509e213439656c938..c1574a53eda063e7cc51de43e3504e59979429ea 100644
--- a/chrome/common/extensions/docs/examples/api/desktopCapture/background.js
+++ b/chrome/common/extensions/docs/examples/api/desktopCapture/background.js
@@ -10,3 +10,11 @@ chrome.app.runtime.onLaunched.addListener(function() {
}
});
});
+
+chrome.runtime.onMessage.addListener(function(message, sender, sendResponse) {
+ chrome.desktopCapture.chooseDesktopMedia(
+ ["screen", "window"],
+ function(id) {
+ sendResponse({"id": id});
+ });
+});

Powered by Google App Engine
This is Rietveld 408576698