Add way for PermissionContext to be automatically restricted to secure origins.

This is in order to generalize the fix in
https://codereview.chromium.org/1146403004/

BUG=None

Review URL: https://codereview.chromium.org/1153873003

Cr-Commit-Position: refs/heads/master@{#332192}
13 files changed