Fix a crash when chooseDesktopMedia is called with no target tab
DesktopMediaPicker was getting created with web_contents returned by
web_contents(), which is part of WebContentsObserver interface,
and which does not get set when the target tab is not specified.
Also, fix handling of a case when the method is called when there are
no web contents to attach the picker dialog to.
BUG=375576,364050
TEST=from a extension with desktopCapture permission:
chrome.desktopCapture.chooseDesktopMedia(['screen'], undefined, function())
does not crash
Review URL: https://codereview.chromium.org/
307453010
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@274771 0039d316-1c4b-4281-b951-d872f2087c98