summaryrefslogtreecommitdiffstats
path: root/extensions/shell/renderer
diff options
context:
space:
mode:
authorraymes <raymes@chromium.org>2014-11-06 17:26:22 -0800
committerCommit bot <commit-bot@chromium.org>2014-11-07 01:27:17 +0000
commit9765493708d63e233b77a1849c0aa399407be292 (patch)
treeb9b44488355101dc1426f3163710e7ac4533ed61 /extensions/shell/renderer
parent2f5fb91566b8d2d9861c4b0437bcfb20cba3f1d9 (diff)
downloadchromium_src-9765493708d63e233b77a1849c0aa399407be292.zip
chromium_src-9765493708d63e233b77a1849c0aa399407be292.tar.gz
chromium_src-9765493708d63e233b77a1849c0aa399407be292.tar.bz2
Support embedded plugins with MimeHandlerView.
This change adds support for embedded plugins getting loaded via MimeHandlerView. Changes: -Changes MimeHandlerViewContainer to kick off a URL request when the content is embedded. This is done because in that case, a URL request isn't started automatically by the browser. -Plumb through the original URL that is used to instantiate the plugin so that it can be loaded (as above). -Change the extensions PluginManager to allow extensions that are associated with a MIME type to be handlers for the file extensions which correspond with that MIME type. This is needed because <embed>ed documents don't typically specify a MIME type. Currently the URL request made won't correctly be intercepted as an http stream. This change will be made in a followup CL. BUG=303491 Review URL: https://codereview.chromium.org/701713003 Cr-Commit-Position: refs/heads/master@{#303152}
Diffstat (limited to 'extensions/shell/renderer')
-rw-r--r--extensions/shell/renderer/shell_content_renderer_client.cc11
-rw-r--r--extensions/shell/renderer/shell_content_renderer_client.h3
2 files changed, 9 insertions, 5 deletions
diff --git a/extensions/shell/renderer/shell_content_renderer_client.cc b/extensions/shell/renderer/shell_content_renderer_client.cc
index 3f5b17f..216eac6 100644
--- a/extensions/shell/renderer/shell_content_renderer_client.cc
+++ b/extensions/shell/renderer/shell_content_renderer_client.cc
@@ -179,11 +179,14 @@ bool ShellContentRendererClient::ShouldEnableSiteIsolationPolicy() const {
content::BrowserPluginDelegate*
ShellContentRendererClient::CreateBrowserPluginDelegate(
content::RenderFrame* render_frame,
- const std::string& mime_type) {
- if (mime_type == content::kBrowserPluginMimeType)
+ const std::string& mime_type,
+ const GURL& original_url) {
+ if (mime_type == content::kBrowserPluginMimeType) {
return new extensions::ExtensionsGuestViewContainer(render_frame);
- else
- return new extensions::MimeHandlerViewContainer(render_frame, mime_type);
+ } else {
+ return new extensions::MimeHandlerViewContainer(
+ render_frame, mime_type, original_url);
+ }
}
} // namespace extensions
diff --git a/extensions/shell/renderer/shell_content_renderer_client.h b/extensions/shell/renderer/shell_content_renderer_client.h
index a4df9ca..6f62398 100644
--- a/extensions/shell/renderer/shell_content_renderer_client.h
+++ b/extensions/shell/renderer/shell_content_renderer_client.h
@@ -49,7 +49,8 @@ class ShellContentRendererClient : public content::ContentRendererClient {
bool ShouldEnableSiteIsolationPolicy() const override;
content::BrowserPluginDelegate* CreateBrowserPluginDelegate(
content::RenderFrame* render_frame,
- const std::string& mime_type) override;
+ const std::string& mime_type,
+ const GURL& original_url) override;
private:
scoped_ptr<ShellExtensionsClient> extensions_client_;