Skip to content

Commit

Permalink
Fixed similar issue of nwjs#4579 for nw.Screen.DesktopCaptureMonitor
Browse files Browse the repository at this point in the history
NWJS app allows running on origins other than `chrome-extension://*/*`.
The origin should then be from the senders URL, in order not to fail
the origin checking in `DesktopStreamsRegistry::RequestMediaForStreamId`.

See also nwjs/chromium.src#11
  • Loading branch information
Cong Liu committed Mar 18, 2016
1 parent b0f2800 commit eff0034
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/api/nw_screen_api.cc
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ namespace extensions {
content::RenderFrameHost* const main_frame = web_contents->GetMainFrame();
result = registry->RegisterStream(main_frame->GetProcess()->GetID(),
main_frame->GetRoutingID(),
extension()->url(),
web_contents->GetURL().GetOrigin(),
source,
extension()->name());
response->AppendString(result);
Expand Down

0 comments on commit eff0034

Please sign in to comment.