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_TEST_SHELF_VIEW_TEST_API_H_ | 5 #ifndef ASH_TEST_SHELF_VIEW_TEST_API_H_ |
6 #define ASH_TEST_SHELF_VIEW_TEST_API_H_ | 6 #define ASH_TEST_SHELF_VIEW_TEST_API_H_ |
7 | 7 |
8 #include "ash/shelf/shelf_item_delegate.h" | 8 #include "ash/shelf/shelf_item_delegate.h" |
9 #include "ash/shelf/shelf_item_types.h" | 9 #include "ash/shelf/shelf_item_types.h" |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
11 | 11 |
12 namespace gfx { | 12 namespace gfx { |
13 class Rect; | 13 class Rect; |
14 class Size; | 14 class Size; |
15 } | 15 } |
16 | 16 |
17 namespace ui { | 17 namespace ui { |
18 class Event; | 18 class Event; |
19 } | 19 } |
20 | 20 |
21 namespace views { | 21 namespace views { |
22 class Button; | 22 class Button; |
23 } | 23 } |
24 | 24 |
25 namespace ash { | 25 namespace ash { |
26 class OverflowBubble; | 26 class OverflowBubble; |
27 class ShelfButton; | 27 class ShelfButton; |
28 class ShelfButtonPressedMetricTracker; | 28 class ShelfButtonPressedMetricTracker; |
29 class ShelfDelegate; | 29 class ShelfDelegate; |
| 30 class ShelfTooltipManager; |
30 class ShelfView; | 31 class ShelfView; |
31 | 32 |
32 namespace test { | 33 namespace test { |
33 | 34 |
34 // Use the api in this class to test ShelfView. | 35 // Use the api in this class to test ShelfView. |
35 class ShelfViewTestAPI { | 36 class ShelfViewTestAPI { |
36 public: | 37 public: |
37 explicit ShelfViewTestAPI(ShelfView* shelf_view); | 38 explicit ShelfViewTestAPI(ShelfView* shelf_view); |
38 ~ShelfViewTestAPI(); | 39 ~ShelfViewTestAPI(); |
39 | 40 |
(...skipping 21 matching lines...) Expand all Loading... |
61 | 62 |
62 // Sets animation duration in milliseconds for test. | 63 // Sets animation duration in milliseconds for test. |
63 void SetAnimationDuration(int duration_ms); | 64 void SetAnimationDuration(int duration_ms); |
64 | 65 |
65 // Runs message loop and waits until all add/remove animations are done. | 66 // Runs message loop and waits until all add/remove animations are done. |
66 void RunMessageLoopUntilAnimationsDone(); | 67 void RunMessageLoopUntilAnimationsDone(); |
67 | 68 |
68 // An accessor for |shelf_view|. | 69 // An accessor for |shelf_view|. |
69 ShelfView* shelf_view() { return shelf_view_; } | 70 ShelfView* shelf_view() { return shelf_view_; } |
70 | 71 |
| 72 // An accessor for the shelf tooltip manager. |
| 73 ShelfTooltipManager* tooltip_manager(); |
| 74 |
71 // An accessor for overflow bubble. | 75 // An accessor for overflow bubble. |
72 OverflowBubble* overflow_bubble(); | 76 OverflowBubble* overflow_bubble(); |
73 | 77 |
74 // Returns the preferred size of |shelf_view_|. | 78 // Returns the preferred size of |shelf_view_|. |
75 gfx::Size GetPreferredSize(); | 79 gfx::Size GetPreferredSize(); |
76 | 80 |
77 // Returns the button size. | 81 // Returns the button size. |
78 int GetButtonSize(); | 82 int GetButtonSize(); |
79 | 83 |
80 // Returns the button space size. | 84 // Returns the button space size. |
(...skipping 23 matching lines...) Expand all Loading... |
104 private: | 108 private: |
105 ShelfView* shelf_view_; | 109 ShelfView* shelf_view_; |
106 | 110 |
107 DISALLOW_COPY_AND_ASSIGN(ShelfViewTestAPI); | 111 DISALLOW_COPY_AND_ASSIGN(ShelfViewTestAPI); |
108 }; | 112 }; |
109 | 113 |
110 } // namespace test | 114 } // namespace test |
111 } // namespace ash | 115 } // namespace ash |
112 | 116 |
113 #endif // ASH_TEST_SHELF_VIEW_TEST_API_H_ | 117 #endif // ASH_TEST_SHELF_VIEW_TEST_API_H_ |
OLD | NEW |