OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #ifndef VIEWS_WIDGET_TOOLTIP_MANAGER_WIN_H_ | 5 #ifndef VIEWS_WIDGET_TOOLTIP_MANAGER_WIN_H_ |
6 #define VIEWS_WIDGET_TOOLTIP_MANAGER_WIN_H_ | 6 #define VIEWS_WIDGET_TOOLTIP_MANAGER_WIN_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <windows.h> | 9 #include <windows.h> |
10 #include <commctrl.h> | 10 #include <commctrl.h> |
11 #include <string> | 11 #include <string> |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 | 70 |
71 // Invoked when toolbar icon gets focus. | 71 // Invoked when toolbar icon gets focus. |
72 virtual void ShowKeyboardTooltip(View* view); | 72 virtual void ShowKeyboardTooltip(View* view); |
73 | 73 |
74 // Invoked when toolbar loses focus. | 74 // Invoked when toolbar loses focus. |
75 virtual void HideKeyboardTooltip(); | 75 virtual void HideKeyboardTooltip(); |
76 | 76 |
77 // Message handlers. These forward to the tooltip control. | 77 // Message handlers. These forward to the tooltip control. |
78 virtual void OnMouse(UINT u_msg, WPARAM w_param, LPARAM l_param); | 78 virtual void OnMouse(UINT u_msg, WPARAM w_param, LPARAM l_param); |
79 LRESULT OnNotify(int w_param, NMHDR* l_param, bool* handled); | 79 LRESULT OnNotify(int w_param, NMHDR* l_param, bool* handled); |
80 // Not used directly by TooltipManager, but provided for AeroTooltipManager. | |
81 virtual void OnMouseLeave() {} | |
82 | 80 |
83 protected: | 81 protected: |
84 virtual void Init(); | 82 virtual void Init(); |
85 | 83 |
86 // Returns the Widget we're showing tooltips for. | 84 // Returns the Widget we're showing tooltips for. |
87 gfx::NativeView GetParent(); | 85 gfx::NativeView GetParent(); |
88 | 86 |
89 // Updates the tooltip for the specified location. | 87 // Updates the tooltip for the specified location. |
90 void UpdateTooltip(const gfx::Point& location); | 88 void UpdateTooltip(const gfx::Point& location); |
91 | 89 |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 // Used to register DestroyTooltipWindow function with PostDelayedTask | 141 // Used to register DestroyTooltipWindow function with PostDelayedTask |
144 // function. | 142 // function. |
145 ScopedRunnableMethodFactory<TooltipManagerWin> keyboard_tooltip_factory_; | 143 ScopedRunnableMethodFactory<TooltipManagerWin> keyboard_tooltip_factory_; |
146 | 144 |
147 DISALLOW_COPY_AND_ASSIGN(TooltipManagerWin); | 145 DISALLOW_COPY_AND_ASSIGN(TooltipManagerWin); |
148 }; | 146 }; |
149 | 147 |
150 } // namespace views | 148 } // namespace views |
151 | 149 |
152 #endif // VIEWS_WIDGET_TOOLTIP_MANAGER_WIN_H_ | 150 #endif // VIEWS_WIDGET_TOOLTIP_MANAGER_WIN_H_ |
OLD | NEW |