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

Side by Side Diff: ui/views/widget/tooltip_manager_aura.cc

Issue 25478006: Nukes some dead TooltipManager code (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Nuke field Created 7 years, 2 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/views/widget/tooltip_manager_aura.h" 5 #include "ui/views/widget/tooltip_manager_aura.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "ui/aura/client/tooltip_client.h" 8 #include "ui/aura/client/tooltip_client.h"
9 #include "ui/aura/root_window.h" 9 #include "ui/aura/root_window.h"
10 #include "ui/base/resource/resource_bundle.h" 10 #include "ui/base/resource/resource_bundle.h"
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 if (aura::client::GetTooltipClient(root_window)) { 66 if (aura::client::GetTooltipClient(root_window)) {
67 gfx::Point view_point = root_window->GetLastMouseLocationInRoot(); 67 gfx::Point view_point = root_window->GetLastMouseLocationInRoot();
68 aura::Window::ConvertPointToTarget(root_window, window_, &view_point); 68 aura::Window::ConvertPointToTarget(root_window, window_, &view_point);
69 View* target = GetViewUnderPoint(view_point); 69 View* target = GetViewUnderPoint(view_point);
70 if (target != view) 70 if (target != view)
71 return; 71 return;
72 UpdateTooltipForTarget(view, view_point, root_window); 72 UpdateTooltipForTarget(view, view_point, root_window);
73 } 73 }
74 } 74 }
75 75
76 void TooltipManagerAura::ShowKeyboardTooltip(View* view) {
77 NOTREACHED();
78 }
79
80 void TooltipManagerAura::HideKeyboardTooltip() {
81 NOTREACHED();
82 }
83
84 View* TooltipManagerAura::GetViewUnderPoint(const gfx::Point& point) { 76 View* TooltipManagerAura::GetViewUnderPoint(const gfx::Point& point) {
85 View* root_view = widget_->GetRootView(); 77 View* root_view = widget_->GetRootView();
86 if (root_view) 78 if (root_view)
87 return root_view->GetTooltipHandlerForPoint(point); 79 return root_view->GetTooltipHandlerForPoint(point);
88 return NULL; 80 return NULL;
89 } 81 }
90 82
91 void TooltipManagerAura::UpdateTooltipForTarget(View* target, 83 void TooltipManagerAura::UpdateTooltipForTarget(View* target,
92 const gfx::Point& point, 84 const gfx::Point& point,
93 aura::RootWindow* root_window) { 85 aura::RootWindow* root_window) {
94 if (target) { 86 if (target) {
95 gfx::Point view_point = point; 87 gfx::Point view_point = point;
96 View::ConvertPointFromWidget(target, &view_point); 88 View::ConvertPointFromWidget(target, &view_point);
97 string16 new_tooltip_text; 89 string16 new_tooltip_text;
98 if (!target->GetTooltipText(view_point, &new_tooltip_text)) 90 if (!target->GetTooltipText(view_point, &new_tooltip_text))
99 tooltip_text_.clear(); 91 tooltip_text_.clear();
100 else 92 else
101 tooltip_text_ = new_tooltip_text; 93 tooltip_text_ = new_tooltip_text;
102 } else { 94 } else {
103 tooltip_text_.clear(); 95 tooltip_text_.clear();
104 } 96 }
105 aura::client::GetTooltipClient(root_window)->UpdateTooltip(window_); 97 aura::client::GetTooltipClient(root_window)->UpdateTooltip(window_);
106 } 98 }
107 99
108 } // namespace views. 100 } // namespace views.
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698