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

Unified Diff: chrome/browser/renderer_context_menu/render_view_context_menu.cc

Issue 2165523004: Force MimeHandlerView to always use BrowserPlugin (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed a typo Created 4 years, 3 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
Index: chrome/browser/renderer_context_menu/render_view_context_menu.cc
diff --git a/chrome/browser/renderer_context_menu/render_view_context_menu.cc b/chrome/browser/renderer_context_menu/render_view_context_menu.cc
index ad0e6d23320cdd46b025de9b0fe93644c54590a8..ebbb0dba7bb2dcff1cbcb98143100afdac4a46ed 100644
--- a/chrome/browser/renderer_context_menu/render_view_context_menu.cc
+++ b/chrome/browser/renderer_context_menu/render_view_context_menu.cc
@@ -73,6 +73,7 @@
#include "components/autofill/core/common/password_generation_util.h"
#include "components/data_reduction_proxy/core/common/data_reduction_proxy_headers.h"
#include "components/google/core/browser/google_util.h"
+#include "components/guest_view/browser/guest_view_base.h"
#include "components/metrics/proto/omnibox_input_type.pb.h"
#include "components/omnibox/browser/autocomplete_classifier.h"
#include "components/omnibox/browser/autocomplete_match.h"
@@ -92,6 +93,7 @@
#include "content/public/browser/download_manager.h"
#include "content/public/browser/download_save_info.h"
#include "content/public/browser/download_url_parameters.h"
+#include "content/public/browser/guest_mode.h"
#include "content/public/browser/navigation_details.h"
#include "content/public/browser/navigation_entry.h"
#include "content/public/browser/notification_service.h"
@@ -102,12 +104,12 @@
#include "content/public/browser/storage_partition.h"
#include "content/public/browser/user_metrics.h"
#include "content/public/browser/web_contents.h"
-#include "content/public/common/browser_plugin_guest_mode.h"
#include "content/public/common/menu_item.h"
#include "content/public/common/ssl_status.h"
#include "content/public/common/url_utils.h"
#include "extensions/browser/extension_host.h"
#include "extensions/browser/extension_system.h"
+#include "extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.h"
#include "extensions/browser/guest_view/web_view/web_view_guest.h"
#include "extensions/browser/view_type_utils.h"
#include "extensions/common/extension.h"
@@ -500,7 +502,12 @@ gfx::Vector2d RenderViewContextMenu::GetOffset(
#if defined(ENABLE_EXTENSIONS)
// When --use-cross-process-frames-for-guests is enabled, the position is
// transformed in the browser process hittesting code.
- if (!content::BrowserPluginGuestMode::UseCrossProcessFramesForGuests()) {
+ WebContents* web_contents =
+ WebContents::FromRenderFrameHost(render_frame_host);
+ // TODO(ekaramad): For now, MimeHandlerView is based on BrowserPlugin even
+ // when guests use OOPIF. Remove the check below when MimeHandlerView is also
+ // based on OOPIF (https://crbug.com/563285).
+ if (content::guest_mode::IsCrossProcessFrameGuest(web_contents)) {
WebContents* web_contents =
WebContents::FromRenderFrameHost(render_frame_host);
lfg 2016/09/02 18:29:40 No need to redefine web_contents.
EhsanK 2016/09/02 21:01:06 Done.
WebContents* top_level_web_contents =

Powered by Google App Engine
This is Rietveld 408576698