Make getUserMedia fail if system mic permission is denied on macOS.

* Fail with NotAllowedError.
* Introduce new internal error, system permission denied, to be able to have a
  custom error message in the error.
* Invoke the call to check system authorization status using performSelector to
  avoid availability compile errors due to only available on iOS with the SDK we
  currently use (10.12).
* Explicitly request system authorization. This is needed so that the system
  gives the correct information when checking the authorization state later.
  Otherwise it incorrectly keeps returning "not determined" until browser

Bug: 925334
Change-Id: Ieecd2e592b74003ecbd29a6fdc4529f2bc88eab8
Commit-Queue: Henrik Grunell <>
Reviewed-by: Elly Fong-Jones <>
Reviewed-by: Tommi <>
Reviewed-by: Dominick Ng <>
Reviewed-by: Dmitry Gozman <>
Reviewed-by: Guido Urdaneta <>
Reviewed-by: Kentaro Hara <>
Cr-Original-Commit-Position: refs/heads/master@{#627620}(cherry picked from commit 5c79e193f133dce2fbfadf473a1d9fecfe323f70)
Reviewed-by: Henrik Grunell <>
Cr-Commit-Position: refs/branch-heads/3683@{#117}
Cr-Branched-From: e51029943e0a38dd794b73caaf6373d5496ae783-refs/heads/master@{#625896}
10 files changed