OLD | NEW |
1 // Copyright (c) 2011 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_AERO_TOOLTIP_MANAGER_H_ | 5 #ifndef VIEWS_WIDGET_AERO_TOOLTIP_MANAGER_H_ |
6 #define VIEWS_WIDGET_AERO_TOOLTIP_MANAGER_H_ | 6 #define VIEWS_WIDGET_AERO_TOOLTIP_MANAGER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
10 #include "base/task.h" | 10 #include "base/task.h" |
(...skipping 15 matching lines...) Expand all Loading... |
26 // So instead, we have to partially implement tooltips ourselves using | 26 // So instead, we have to partially implement tooltips ourselves using |
27 // TTF_TRACKed tooltips. | 27 // TTF_TRACKed tooltips. |
28 // | 28 // |
29 // TODO(glen): Resolve this with Microsoft. | 29 // TODO(glen): Resolve this with Microsoft. |
30 class AeroTooltipManager : public TooltipManagerWin { | 30 class AeroTooltipManager : public TooltipManagerWin { |
31 public: | 31 public: |
32 explicit AeroTooltipManager(Widget* widget); | 32 explicit AeroTooltipManager(Widget* widget); |
33 virtual ~AeroTooltipManager(); | 33 virtual ~AeroTooltipManager(); |
34 | 34 |
35 virtual void OnMouse(UINT u_msg, WPARAM w_param, LPARAM l_param); | 35 virtual void OnMouse(UINT u_msg, WPARAM w_param, LPARAM l_param); |
36 virtual void OnMouseLeave(); | |
37 | 36 |
38 private: | 37 private: |
39 void Init(); | 38 void Init(); |
40 void OnTimer(); | 39 void OnTimer(); |
41 | 40 |
42 class InitialTimer : public base::RefCounted<InitialTimer> { | 41 class InitialTimer : public base::RefCounted<InitialTimer> { |
43 public: | 42 public: |
44 explicit InitialTimer(AeroTooltipManager* manager); | 43 explicit InitialTimer(AeroTooltipManager* manager); |
45 void Start(int time); | 44 void Start(int time); |
46 void Disown(); | 45 void Disown(); |
47 void Execute(); | 46 void Execute(); |
48 | 47 |
49 private: | 48 private: |
50 friend class base::RefCounted<InitialTimer>; | 49 friend class base::RefCounted<InitialTimer>; |
51 | 50 |
52 ~InitialTimer() {} | 51 ~InitialTimer() {} |
53 | 52 |
54 AeroTooltipManager* manager_; | 53 AeroTooltipManager* manager_; |
55 }; | 54 }; |
56 | 55 |
57 int initial_delay_; | 56 int initial_delay_; |
58 scoped_refptr<InitialTimer> initial_timer_; | 57 scoped_refptr<InitialTimer> initial_timer_; |
59 }; | 58 }; |
60 | 59 |
61 } // namespace views | 60 } // namespace views |
62 | 61 |
63 #endif // #ifndef VIEWS_WIDGET_AERO_TOOLTIP_MANAGER_H_ | 62 #endif // #ifndef VIEWS_WIDGET_AERO_TOOLTIP_MANAGER_H_ |
OLD | NEW |