webview/plugins: Allow manifest-listed resources to be loaded in plugins.
commitf43c33c1a93a3d5ba9364f2a5064a398b754d80a
authorSadrul Habib Chowdhury <sadrul@chromium.org>
Thu, 4 Dec 2014 15:53:52 +0000 (4 10:53 -0500)
committerSadrul Habib Chowdhury <sadrul@chromium.org>
Thu, 4 Dec 2014 15:54:42 +0000 (4 15:54 +0000)
tree52a35ac862968913443b8a96bea771e442b06cf4
parent5a0f52af1c05e08b5aaa89f44ae9c1cb6812b7b1
webview/plugins: Allow manifest-listed resources to be loaded in plugins.

If a plugin attempts to load a resource that belongs to an extension/app in
a <webview>, then it is normally blocked because of content-settings rules.
However, if the app lists the resource(s) in |accessible_resources| in its
manifest, then allow the plugin to load them. In this case, a
'permissionrequest' event triggers in the embedder, and the app can decide
whether to allow the guest to load the plugin or not.

BUG=422372
R=bauerb@chromium.org, fsamuel@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#306817}
chrome/browser/apps/web_view_browsertest.cc
chrome/browser/plugins/plugin_info_message_filter.cc
chrome/browser/plugins/plugin_info_message_filter.h
chrome/test/data/extensions/platform_apps/web_view/shim/main.js
chrome/test/data/extensions/platform_apps/web_view/shim/manifest.json
chrome/test/data/extensions/platform_apps/web_view/shim/test.pdf [new file with mode: 0644]
extensions/browser/guest_view/web_view/web_view_renderer_state.cc
extensions/browser/guest_view/web_view/web_view_renderer_state.h