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_TOOLTIP_MANAGER_VIEWS_H_ | 5 #ifndef VIEWS_WIDGET_TOOLTIP_MANAGER_VIEWS_H_ |
6 #define VIEWS_WIDGET_TOOLTIP_MANAGER_VIEWS_H_ | 6 #define VIEWS_WIDGET_TOOLTIP_MANAGER_VIEWS_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
10 #include "base/timer.h" | 10 #include "base/timer.h" |
(...skipping 27 matching lines...) Expand all Loading... |
38 | 38 |
39 // TooltipManager. | 39 // TooltipManager. |
40 virtual void UpdateTooltip() OVERRIDE; | 40 virtual void UpdateTooltip() OVERRIDE; |
41 virtual void TooltipTextChanged(View* view) OVERRIDE; | 41 virtual void TooltipTextChanged(View* view) OVERRIDE; |
42 virtual void ShowKeyboardTooltip(View* view) OVERRIDE; | 42 virtual void ShowKeyboardTooltip(View* view) OVERRIDE; |
43 virtual void HideKeyboardTooltip() OVERRIDE; | 43 virtual void HideKeyboardTooltip() OVERRIDE; |
44 | 44 |
45 #if defined(USE_WAYLAND) | 45 #if defined(USE_WAYLAND) |
46 virtual base::MessagePumpObserver::EventStatus WillProcessEvent( | 46 virtual base::MessagePumpObserver::EventStatus WillProcessEvent( |
47 ui::WaylandEvent* event) OVERRIDE; | 47 ui::WaylandEvent* event) OVERRIDE; |
48 #elif defined(USE_X11) | 48 #else |
49 // MessageLoopForUI::Observer | 49 // MessageLoopForUI::Observer |
50 virtual base::MessagePumpObserver::EventStatus WillProcessXEvent( | 50 virtual base::EventStatus WillProcessEvent( |
51 XEvent* xevent) OVERRIDE; | 51 const base::NativeEvent& event) OVERRIDE; |
52 #elif defined(OS_WIN) | 52 virtual void DidProcessEvent(const base::NativeEvent& event) OVERRIDE; |
53 virtual void WillProcessMessage(const MSG& msg) OVERRIDE; | |
54 virtual void DidProcessMessage(const MSG& msg) OVERRIDE; | |
55 #endif | 53 #endif |
56 | 54 |
57 private: | 55 private: |
58 void TooltipTimerFired(); | 56 void TooltipTimerFired(); |
59 View* GetViewForTooltip(int x, int y, bool for_keyboard); | 57 View* GetViewForTooltip(int x, int y, bool for_keyboard); |
60 | 58 |
61 // Updates the tooltip if required (if there is any change in the tooltip | 59 // Updates the tooltip if required (if there is any change in the tooltip |
62 // text or the view. | 60 // text or the view. |
63 void UpdateIfRequired(int x, int y, bool for_keyboard); | 61 void UpdateIfRequired(int x, int y, bool for_keyboard); |
64 | 62 |
(...skipping 20 matching lines...) Expand all Loading... |
85 | 83 |
86 gfx::Point curr_mouse_pos_; | 84 gfx::Point curr_mouse_pos_; |
87 base::RepeatingTimer<TooltipManagerViews> tooltip_timer_; | 85 base::RepeatingTimer<TooltipManagerViews> tooltip_timer_; |
88 | 86 |
89 DISALLOW_COPY_AND_ASSIGN(TooltipManagerViews); | 87 DISALLOW_COPY_AND_ASSIGN(TooltipManagerViews); |
90 }; | 88 }; |
91 | 89 |
92 } // namespace views | 90 } // namespace views |
93 | 91 |
94 #endif // VIEWS_WIDGET_TOOLTIP_MANAGER_VIEWS_H_ | 92 #endif // VIEWS_WIDGET_TOOLTIP_MANAGER_VIEWS_H_ |
OLD | NEW |