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 ASH_LAUNCHER_LAUNCHER_TOOLTIP_MANAGER_H_ | 5 #ifndef ASH_LAUNCHER_LAUNCHER_TOOLTIP_MANAGER_H_ |
6 #define ASH_LAUNCHER_LAUNCHER_TOOLTIP_MANAGER_H_ | 6 #define ASH_LAUNCHER_LAUNCHER_TOOLTIP_MANAGER_H_ |
7 | 7 |
8 #include "ash/ash_export.h" | 8 #include "ash/ash_export.h" |
9 #include "ash/shelf/shelf_layout_manager_observer.h" | 9 #include "ash/shelf/shelf_layout_manager_observer.h" |
10 #include "ash/shelf/shelf_types.h" | 10 #include "ash/shelf/shelf_types.h" |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 // Resets the timer for the delayed showing |view_|. If the timer isn't | 67 // Resets the timer for the delayed showing |view_|. If the timer isn't |
68 // running, it starts a new timer. | 68 // running, it starts a new timer. |
69 void ResetTimer(); | 69 void ResetTimer(); |
70 | 70 |
71 // Stops the timer for the delayed showing |view_|. | 71 // Stops the timer for the delayed showing |view_|. |
72 void StopTimer(); | 72 void StopTimer(); |
73 | 73 |
74 // Returns true if the tooltip is currently visible. | 74 // Returns true if the tooltip is currently visible. |
75 bool IsVisible(); | 75 bool IsVisible(); |
76 | 76 |
| 77 // Returns the view to which the tooltip bubble is anchored. May be NULL. |
| 78 views::View* GetCurrentAnchorView() { return anchor_; } |
| 79 |
77 // Create an instant timer for test purposes. | 80 // Create an instant timer for test purposes. |
78 void CreateZeroDelayTimerForTest(); | 81 void CreateZeroDelayTimerForTest(); |
79 | 82 |
80 protected: | 83 protected: |
81 // ui::EventHandler overrides: | 84 // ui::EventHandler overrides: |
82 virtual void OnMouseEvent(ui::MouseEvent* event) OVERRIDE; | 85 virtual void OnMouseEvent(ui::MouseEvent* event) OVERRIDE; |
83 virtual void OnTouchEvent(ui::TouchEvent* event) OVERRIDE; | 86 virtual void OnTouchEvent(ui::TouchEvent* event) OVERRIDE; |
84 virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE; | 87 virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE; |
85 virtual void OnCancelMode(ui::CancelModeEvent* event) OVERRIDE; | 88 virtual void OnCancelMode(ui::CancelModeEvent* event) OVERRIDE; |
86 | 89 |
(...skipping 25 matching lines...) Expand all Loading... |
112 | 115 |
113 base::WeakPtrFactory<LauncherTooltipManager> weak_factory_; | 116 base::WeakPtrFactory<LauncherTooltipManager> weak_factory_; |
114 | 117 |
115 DISALLOW_COPY_AND_ASSIGN(LauncherTooltipManager); | 118 DISALLOW_COPY_AND_ASSIGN(LauncherTooltipManager); |
116 }; | 119 }; |
117 | 120 |
118 } // namespace internal | 121 } // namespace internal |
119 } // namespace ash | 122 } // namespace ash |
120 | 123 |
121 #endif // ASH_LAUNCHER_LAUNCHER_TOOLTIP_MANAGER_H_ | 124 #endif // ASH_LAUNCHER_LAUNCHER_TOOLTIP_MANAGER_H_ |
OLD | NEW |