| OLD | NEW |
| 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 #ifndef UI_VIEWS_COREWM_TOOLTIP_CONTROLLER_H_ | 5 #ifndef UI_VIEWS_COREWM_TOOLTIP_CONTROLLER_H_ |
| 6 #define UI_VIEWS_COREWM_TOOLTIP_CONTROLLER_H_ | 6 #define UI_VIEWS_COREWM_TOOLTIP_CONTROLLER_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 | 9 |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 aura::Window* tooltip_window_; | 83 aura::Window* tooltip_window_; |
| 84 base::string16 tooltip_text_; | 84 base::string16 tooltip_text_; |
| 85 const void* tooltip_id_; | 85 const void* tooltip_id_; |
| 86 | 86 |
| 87 // These fields are for tracking state when the user presses a mouse button. | 87 // These fields are for tracking state when the user presses a mouse button. |
| 88 aura::Window* tooltip_window_at_mouse_press_; | 88 aura::Window* tooltip_window_at_mouse_press_; |
| 89 base::string16 tooltip_text_at_mouse_press_; | 89 base::string16 tooltip_text_at_mouse_press_; |
| 90 | 90 |
| 91 scoped_ptr<Tooltip> tooltip_; | 91 scoped_ptr<Tooltip> tooltip_; |
| 92 | 92 |
| 93 base::RepeatingTimer<TooltipController> tooltip_timer_; | 93 base::RepeatingTimer tooltip_timer_; |
| 94 | 94 |
| 95 // Timer to timeout the life of an on-screen tooltip. We hide the tooltip when | 95 // Timer to timeout the life of an on-screen tooltip. We hide the tooltip when |
| 96 // this timer fires. | 96 // this timer fires. |
| 97 base::OneShotTimer<TooltipController> tooltip_shown_timer_; | 97 base::OneShotTimer tooltip_shown_timer_; |
| 98 | 98 |
| 99 // Location of the last event in |tooltip_window_|'s coordinates. | 99 // Location of the last event in |tooltip_window_|'s coordinates. |
| 100 gfx::Point curr_mouse_loc_; | 100 gfx::Point curr_mouse_loc_; |
| 101 | 101 |
| 102 bool tooltips_enabled_; | 102 bool tooltips_enabled_; |
| 103 | 103 |
| 104 std::map<aura::Window*, int> tooltip_shown_timeout_map_; | 104 std::map<aura::Window*, int> tooltip_shown_timeout_map_; |
| 105 | 105 |
| 106 DISALLOW_COPY_AND_ASSIGN(TooltipController); | 106 DISALLOW_COPY_AND_ASSIGN(TooltipController); |
| 107 }; | 107 }; |
| 108 | 108 |
| 109 } // namespace corewm | 109 } // namespace corewm |
| 110 } // namespace views | 110 } // namespace views |
| 111 | 111 |
| 112 #endif // UI_VIEWS_COREWM_TOOLTIP_CONTROLLER_H_ | 112 #endif // UI_VIEWS_COREWM_TOOLTIP_CONTROLLER_H_ |
| OLD | NEW |