| 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 17 matching lines...) Expand all Loading... |
| 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 | 36 |
| 37 private: | 37 private: |
| 38 void Init(); | |
| 39 void OnTimer(); | 38 void OnTimer(); |
| 40 | 39 |
| 41 class InitialTimer : public base::RefCounted<InitialTimer> { | 40 class InitialTimer : public base::RefCounted<InitialTimer> { |
| 42 public: | 41 public: |
| 43 explicit InitialTimer(AeroTooltipManager* manager); | 42 explicit InitialTimer(AeroTooltipManager* manager); |
| 44 void Start(int time); | 43 void Start(int time); |
| 45 void Disown(); | 44 void Disown(); |
| 46 void Execute(); | 45 void Execute(); |
| 47 | 46 |
| 48 private: | 47 private: |
| 49 friend class base::RefCounted<InitialTimer>; | 48 friend class base::RefCounted<InitialTimer>; |
| 50 | 49 |
| 51 ~InitialTimer() {} | 50 ~InitialTimer() {} |
| 52 | 51 |
| 53 AeroTooltipManager* manager_; | 52 AeroTooltipManager* manager_; |
| 54 }; | 53 }; |
| 55 | 54 |
| 56 int initial_delay_; | 55 int initial_delay_; |
| 57 scoped_refptr<InitialTimer> initial_timer_; | 56 scoped_refptr<InitialTimer> initial_timer_; |
| 58 }; | 57 }; |
| 59 | 58 |
| 60 } // namespace views | 59 } // namespace views |
| 61 | 60 |
| 62 #endif // #ifndef VIEWS_WIDGET_AERO_TOOLTIP_MANAGER_H_ | 61 #endif // #ifndef VIEWS_WIDGET_AERO_TOOLTIP_MANAGER_H_ |
| OLD | NEW |