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

Unified Diff: content/browser/renderer_host/render_widget_host_view_aura.cc

Issue 1692593002: Use showing_context_menu_ from RenderWidgetHostViewBase to avoid MouseLeave event on Context Menu (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Make CanRendererHandleEvent const. Created 4 years, 10 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 | « content/browser/renderer_host/render_widget_host_view_aura.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/render_widget_host_view_aura.cc
diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc
index d06fde40a5576d801c9d86386f99a1ca76309f37..d78031f1fa4004f3483318d2fb8e844fe5484c60 100644
--- a/content/browser/renderer_host/render_widget_host_view_aura.cc
+++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
@@ -474,7 +474,6 @@ RenderWidgetHostViewAura::RenderWidgetHostViewAura(RenderWidgetHost* host,
#if defined(OS_WIN)
legacy_render_widget_host_HWND_(NULL),
legacy_window_destroyed_(false),
- showing_context_menu_(false),
#endif
has_snapped_to_boundary_(false),
is_guest_view_hack_(is_guest_view_hack),
@@ -797,12 +796,7 @@ RenderFrameHostImpl* RenderWidgetHostViewAura::GetFocusedFrame() {
bool RenderWidgetHostViewAura::CanRendererHandleEvent(
const ui::MouseEvent* event,
bool mouse_locked,
- bool selection_popup) {
-#if defined(OS_WIN)
- bool showing_context_menu = showing_context_menu_;
- showing_context_menu_ = false;
-#endif
-
+ bool selection_popup) const {
if (event->type() == ui::ET_MOUSE_CAPTURE_CHANGED)
return false;
@@ -813,7 +807,7 @@ bool RenderWidgetHostViewAura::CanRendererHandleEvent(
// Don't forward the mouse leave message which is received when the context
// menu is displayed by the page. This confuses the page and causes state
// changes.
- if (showing_context_menu)
+ if (IsShowingContextMenu())
return false;
#endif
return true;
@@ -2722,7 +2716,6 @@ bool RenderWidgetHostViewAura::OnShowContextMenu(
*last_context_menu_params_ = params;
return false;
}
- showing_context_menu_ = true;
#endif
return true;
}
« no previous file with comments | « content/browser/renderer_host/render_widget_host_view_aura.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698