diff options
author | raymes <raymes@chromium.org> | 2014-11-06 15:25:17 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-11-06 23:26:19 +0000 |
commit | 78e3d60d83366c66e82ec147a061be200088a656 (patch) | |
tree | e8e2ad7b90dc236bfdd17d4b62c6e6d5cf76f589 /extensions/shell/renderer | |
parent | 9094d3aa8cb9e9aed2450dca2535b764632b9d7e (diff) | |
download | chromium_src-78e3d60d83366c66e82ec147a061be200088a656.zip chromium_src-78e3d60d83366c66e82ec147a061be200088a656.tar.gz chromium_src-78e3d60d83366c66e82ec147a061be200088a656.tar.bz2 |
Refactor GuestViewContainer to split out WebView related logic and MimeHandlerView related logic.
This refactors GuestViewContainer to separate WebView related logic and MimeHandlerView
related logic. Two subclasses are created to contain the logic related to each. The
content API has to be modified to allow creating each of the two types of container.
BUG=303491
Review URL: https://codereview.chromium.org/702433002
Cr-Commit-Position: refs/heads/master@{#303118}
Diffstat (limited to 'extensions/shell/renderer')
-rw-r--r-- | extensions/shell/renderer/shell_content_renderer_client.cc | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/extensions/shell/renderer/shell_content_renderer_client.cc b/extensions/shell/renderer/shell_content_renderer_client.cc index 487731d..3f5b17f 100644 --- a/extensions/shell/renderer/shell_content_renderer_client.cc +++ b/extensions/shell/renderer/shell_content_renderer_client.cc @@ -4,6 +4,7 @@ #include "extensions/shell/renderer/shell_content_renderer_client.h" +#include "content/public/common/content_constants.h" #include "content/public/renderer/render_frame.h" #include "content/public/renderer/render_frame_observer.h" #include "content/public/renderer/render_frame_observer_tracker.h" @@ -12,7 +13,8 @@ #include "extensions/renderer/default_dispatcher_delegate.h" #include "extensions/renderer/dispatcher.h" #include "extensions/renderer/extension_helper.h" -#include "extensions/renderer/guest_view/guest_view_container.h" +#include "extensions/renderer/guest_view/extensions_guest_view_container.h" +#include "extensions/renderer/guest_view/mime_handler_view_container.h" #include "extensions/shell/common/shell_extensions_client.h" #include "extensions/shell/renderer/shell_extensions_renderer_client.h" #include "third_party/WebKit/public/web/WebLocalFrame.h" @@ -178,7 +180,10 @@ content::BrowserPluginDelegate* ShellContentRendererClient::CreateBrowserPluginDelegate( content::RenderFrame* render_frame, const std::string& mime_type) { - return new extensions::GuestViewContainer(render_frame, mime_type); + if (mime_type == content::kBrowserPluginMimeType) + return new extensions::ExtensionsGuestViewContainer(render_frame); + else + return new extensions::MimeHandlerViewContainer(render_frame, mime_type); } } // namespace extensions |