Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(427)

Unified Diff: components/renderer_context_menu/render_view_context_menu_base.cc

Issue 1117893002: Moving extension code out of "components/" to avoid layering violations. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressing nit. Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/renderer_context_menu/render_view_context_menu_base.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/renderer_context_menu/render_view_context_menu_base.cc
diff --git a/components/renderer_context_menu/render_view_context_menu_base.cc b/components/renderer_context_menu/render_view_context_menu_base.cc
index 3d9487ac288aa543fd2fc81f001f28747b4bf1ec..26efb960623480e98397963c4752dc6c3f1e6b48 100644
--- a/components/renderer_context_menu/render_view_context_menu_base.cc
+++ b/components/renderer_context_menu/render_view_context_menu_base.cc
@@ -15,9 +15,6 @@
#include "content/public/browser/render_widget_host_view.h"
#include "content/public/browser/web_contents.h"
#include "content/public/common/menu_item.h"
-#if defined(ENABLE_EXTENSIONS)
-#include "extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.h"
-#endif
#include "third_party/WebKit/public/web/WebContextMenuData.h"
using blink::WebContextMenuData;
@@ -129,17 +126,6 @@ void AddCustomItemsToMenu(const std::vector<content::MenuItem>& items,
}
}
-content::WebContents* GetWebContentsToUse(content::WebContents* web_contents) {
-// If we're viewing in a MimeHandlerViewGuest, use its embedder WebContents.
-#if defined(ENABLE_EXTENSIONS)
- auto guest_view =
- extensions::MimeHandlerViewGuest::FromWebContents(web_contents);
- if (guest_view)
- return guest_view->embedder_web_contents();
-#endif
- return web_contents;
-}
-
} // namespace
// static
@@ -169,7 +155,6 @@ RenderViewContextMenuBase::RenderViewContextMenuBase(
const content::ContextMenuParams& params)
: params_(params),
source_web_contents_(WebContents::FromRenderFrameHost(render_frame_host)),
- embedder_web_contents_(GetWebContentsToUse(source_web_contents_)),
browser_context_(source_web_contents_->GetBrowserContext()),
menu_model_(this),
render_frame_id_(render_frame_host->GetRoutingID()),
« no previous file with comments | « components/renderer_context_menu/render_view_context_menu_base.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698