summaryrefslogtreecommitdiffstats
path: root/chromium/ui/views/widget/tooltip_manager_aura.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/ui/views/widget/tooltip_manager_aura.cc')
-rw-r--r--chromium/ui/views/widget/tooltip_manager_aura.cc16
1 files changed, 10 insertions, 6 deletions
diff --git a/chromium/ui/views/widget/tooltip_manager_aura.cc b/chromium/ui/views/widget/tooltip_manager_aura.cc
index 173597939c9..99ae9e6be57 100644
--- a/chromium/ui/views/widget/tooltip_manager_aura.cc
+++ b/chromium/ui/views/widget/tooltip_manager_aura.cc
@@ -6,12 +6,13 @@
#include "base/logging.h"
#include "ui/aura/client/screen_position_client.h"
-#include "ui/aura/client/tooltip_client.h"
-#include "ui/aura/root_window.h"
+#include "ui/aura/window_event_dispatcher.h"
+#include "ui/aura/window_tree_host.h"
#include "ui/base/resource/resource_bundle.h"
#include "ui/gfx/rect.h"
#include "ui/gfx/screen.h"
#include "ui/views/widget/widget.h"
+#include "ui/wm/public/tooltip_client.h"
namespace views {
@@ -49,7 +50,7 @@ void TooltipManagerAura::UpdateTooltipManagerForCapture(Widget* source) {
return;
gfx::Point screen_loc(
- root_window->GetDispatcher()->GetLastMouseLocationInRoot());
+ root_window->GetHost()->dispatcher()->GetLastMouseLocationInRoot());
aura::client::ScreenPositionClient* screen_position_client =
aura::client::GetScreenPositionClient(root_window);
if (!screen_position_client)
@@ -91,7 +92,7 @@ void TooltipManagerAura::UpdateTooltip() {
aura::Window* root_window = GetWindow()->GetRootWindow();
if (aura::client::GetTooltipClient(root_window)) {
gfx::Point view_point =
- root_window->GetDispatcher()->GetLastMouseLocationInRoot();
+ root_window->GetHost()->dispatcher()->GetLastMouseLocationInRoot();
aura::Window::ConvertPointToTarget(root_window, GetWindow(), &view_point);
View* view = GetViewUnderPoint(view_point);
UpdateTooltipForTarget(view, view_point, root_window);
@@ -102,7 +103,7 @@ void TooltipManagerAura::TooltipTextChanged(View* view) {
aura::Window* root_window = GetWindow()->GetRootWindow();
if (aura::client::GetTooltipClient(root_window)) {
gfx::Point view_point =
- root_window->GetDispatcher()->GetLastMouseLocationInRoot();
+ root_window->GetHost()->dispatcher()->GetLastMouseLocationInRoot();
aura::Window::ConvertPointToTarget(root_window, GetWindow(), &view_point);
View* target = GetViewUnderPoint(view_point);
if (target != view)
@@ -124,7 +125,7 @@ void TooltipManagerAura::UpdateTooltipForTarget(View* target,
if (target) {
gfx::Point view_point = point;
View::ConvertPointFromWidget(target, &view_point);
- string16 new_tooltip_text;
+ base::string16 new_tooltip_text;
if (!target->GetTooltipText(view_point, &new_tooltip_text))
tooltip_text_.clear();
else
@@ -132,6 +133,9 @@ void TooltipManagerAura::UpdateTooltipForTarget(View* target,
} else {
tooltip_text_.clear();
}
+
+ aura::client::SetTooltipId(GetWindow(), target);
+
aura::client::GetTooltipClient(root_window)->UpdateTooltip(GetWindow());
}