OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 <windows.h> | 5 #include <windows.h> |
6 #include <atlbase.h> | 6 #include <atlbase.h> |
7 #include <atlapp.h> // for GET_X/Y_LPARAM | 7 #include <atlapp.h> // for GET_X/Y_LPARAM |
8 #include <commctrl.h> | 8 #include <commctrl.h> |
9 #include <shlobj.h> | 9 #include <shlobj.h> |
10 | 10 |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 } | 51 } |
52 initial_timer_ = new InitialTimer(this, initial_delay_); | 52 initial_timer_ = new InitialTimer(this, initial_delay_); |
53 } else { | 53 } else { |
54 // Hide the tooltip and cancel any timers. | 54 // Hide the tooltip and cancel any timers. |
55 ::SendMessage(tooltip_hwnd_, TTM_POP, 0, 0); | 55 ::SendMessage(tooltip_hwnd_, TTM_POP, 0, 0); |
56 ::SendMessage(tooltip_hwnd_, TTM_TRACKACTIVATE, false, (LPARAM)&toolinfo_); | 56 ::SendMessage(tooltip_hwnd_, TTM_TRACKACTIVATE, false, (LPARAM)&toolinfo_); |
57 return; | 57 return; |
58 } | 58 } |
59 } | 59 } |
60 | 60 |
| 61 void AeroTooltipManager::OnMouseLeave() { |
| 62 last_mouse_x_ = last_mouse_y_ = -1; |
| 63 UpdateTooltip(); |
| 64 } |
| 65 |
61 /////////////////////////////////////////////////////////////////////////////// | 66 /////////////////////////////////////////////////////////////////////////////// |
62 // AeroTooltipManager, private: | 67 // AeroTooltipManager, private: |
63 | 68 |
64 void AeroTooltipManager::Init() { | 69 void AeroTooltipManager::Init() { |
65 // Create the tooltip control. | 70 // Create the tooltip control. |
66 tooltip_hwnd_ = CreateWindowEx( | 71 tooltip_hwnd_ = CreateWindowEx( |
67 WS_EX_TRANSPARENT | l10n_util::GetExtendedTooltipStyles(), | 72 WS_EX_TRANSPARENT | l10n_util::GetExtendedTooltipStyles(), |
68 TOOLTIPS_CLASS, NULL, TTS_NOPREFIX, 0, 0, 0, 0, | 73 TOOLTIPS_CLASS, NULL, TTS_NOPREFIX, 0, 0, 0, 0, |
69 parent_, NULL, NULL, NULL); | 74 parent_, NULL, NULL, NULL); |
70 // Add one tool that is used for all tooltips. | 75 // Add one tool that is used for all tooltips. |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 manager_ = NULL; | 117 manager_ = NULL; |
113 } | 118 } |
114 | 119 |
115 void AeroTooltipManager::InitialTimer::Execute() { | 120 void AeroTooltipManager::InitialTimer::Execute() { |
116 if (manager_) | 121 if (manager_) |
117 manager_->OnTimer(); | 122 manager_->OnTimer(); |
118 } | 123 } |
119 | 124 |
120 } // namespace views | 125 } // namespace views |
121 | 126 |
OLD | NEW |