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

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

Issue 109403008: Disables showing tooltips while a system menu is showing on windows (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: move resetting Created 6 years, 11 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: 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 700aece9eb79080ed3587257a661ecd65ce04b25..790f0b10810b7fc6bafb4e8a08c42823f6ef123a 100644
--- a/content/browser/renderer_host/render_widget_host_view_aura.cc
+++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
@@ -53,6 +53,7 @@
#include "ui/aura/client/cursor_client.h"
#include "ui/aura/client/cursor_client_observer.h"
#include "ui/aura/client/focus_client.h"
+#include "ui/aura/client/scoped_tooltip_disabler.h"
#include "ui/aura/client/screen_position_client.h"
#include "ui/aura/client/tooltip_client.h"
#include "ui/aura/client/window_tree_client.h"
@@ -2179,14 +2180,15 @@ bool RenderWidgetHostViewAura::LockMouse() {
synthetic_move_sent_ = true;
window_->MoveCursorTo(gfx::Rect(window_->bounds().size()).CenterPoint());
}
- if (aura::client::GetTooltipClient(root_window))
- aura::client::GetTooltipClient(root_window)->SetTooltipsEnabled(false);
+ tooltip_disabler_.reset(new aura::client::ScopedTooltipDisabler(root_window));
root_window->GetDispatcher()->host()->ConfineCursorToRootWindow();
return true;
}
void RenderWidgetHostViewAura::UnlockMouse() {
+ tooltip_disabler_.reset();
+
aura::Window* root_window = window_->GetRootWindow();
if (!mouse_locked_ || !root_window)
return;
@@ -2204,9 +2206,6 @@ void RenderWidgetHostViewAura::UnlockMouse() {
cursor_client->ShowCursor();
}
- if (aura::client::GetTooltipClient(root_window))
- aura::client::GetTooltipClient(root_window)->SetTooltipsEnabled(true);
-
host_->LostMouseLock();
root_window->GetDispatcher()->host()->UnConfineCursor();
}

Powered by Google App Engine
This is Rietveld 408576698