| 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 #include <memory> | 9 #include <memory> |
| 10 | 10 |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 | 104 |
| 105 std::unique_ptr<Tooltip> tooltip_; | 105 std::unique_ptr<Tooltip> tooltip_; |
| 106 | 106 |
| 107 // Timer for requesting delayed updates of the tooltip. | 107 // Timer for requesting delayed updates of the tooltip. |
| 108 base::OneShotTimer tooltip_defer_timer_; | 108 base::OneShotTimer tooltip_defer_timer_; |
| 109 | 109 |
| 110 // Timer to timeout the life of an on-screen tooltip. We hide the tooltip when | 110 // Timer to timeout the life of an on-screen tooltip. We hide the tooltip when |
| 111 // this timer fires. | 111 // this timer fires. |
| 112 base::OneShotTimer tooltip_shown_timer_; | 112 base::OneShotTimer tooltip_shown_timer_; |
| 113 | 113 |
| 114 // Location of the last event in |tooltip_window_|'s coordinates. | 114 // Location of the last events in |tooltip_window_|'s coordinates. |
| 115 gfx::Point curr_mouse_loc_; | 115 gfx::Point curr_mouse_loc_; |
| 116 gfx::Point last_touch_loc_; |
| 116 | 117 |
| 117 bool tooltips_enabled_; | 118 bool tooltips_enabled_; |
| 118 | 119 |
| 119 // An indicator of whether tooltip appears with delay or not. | 120 // An indicator of whether tooltip appears with delay or not. |
| 120 // If the flag is true, tooltip shows up with delay; | 121 // If the flag is true, tooltip shows up with delay; |
| 121 // otherwise there is no delay, which is used in unit tests only. | 122 // otherwise there is no delay, which is used in unit tests only. |
| 122 bool tooltip_show_delayed_; | 123 bool tooltip_show_delayed_; |
| 123 | 124 |
| 124 std::map<aura::Window*, int> tooltip_shown_timeout_map_; | 125 std::map<aura::Window*, int> tooltip_shown_timeout_map_; |
| 125 | 126 |
| 126 DISALLOW_COPY_AND_ASSIGN(TooltipController); | 127 DISALLOW_COPY_AND_ASSIGN(TooltipController); |
| 127 }; | 128 }; |
| 128 | 129 |
| 129 } // namespace corewm | 130 } // namespace corewm |
| 130 } // namespace views | 131 } // namespace views |
| 131 | 132 |
| 132 #endif // UI_VIEWS_COREWM_TOOLTIP_CONTROLLER_H_ | 133 #endif // UI_VIEWS_COREWM_TOOLTIP_CONTROLLER_H_ |
| OLD | NEW |