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/public/cpp/shelf_item.h" | 8 #include "ash/public/cpp/shelf_item.h" |
9 #include "base/macros.h" | 9 #include "base/macros.h" |
10 | 10 |
(...skipping 10 matching lines...) Expand all Loading... |
21 class Button; | 21 class Button; |
22 class InkDrop; | 22 class InkDrop; |
23 class View; | 23 class View; |
24 } | 24 } |
25 | 25 |
26 namespace ash { | 26 namespace ash { |
27 class OverflowBubble; | 27 class OverflowBubble; |
28 class OverflowButton; | 28 class OverflowButton; |
29 class ShelfButton; | 29 class ShelfButton; |
30 class ShelfButtonPressedMetricTracker; | 30 class ShelfButtonPressedMetricTracker; |
31 class ShelfDelegate; | |
32 class ShelfTooltipManager; | 31 class ShelfTooltipManager; |
33 class ShelfView; | 32 class ShelfView; |
34 | 33 |
35 namespace test { | 34 namespace test { |
36 | 35 |
37 // Use the api in this class to test ShelfView. | 36 // Use the api in this class to test ShelfView. |
38 class ShelfViewTestAPI { | 37 class ShelfViewTestAPI { |
39 public: | 38 public: |
40 explicit ShelfViewTestAPI(ShelfView* shelf_view); | 39 explicit ShelfViewTestAPI(ShelfView* shelf_view); |
41 ~ShelfViewTestAPI(); | 40 ~ShelfViewTestAPI(); |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 int GetMinimumDragDistance() const; | 99 int GetMinimumDragDistance() const; |
101 | 100 |
102 // Wrapper for ShelfView::ButtonPressed. | 101 // Wrapper for ShelfView::ButtonPressed. |
103 void ButtonPressed(views::Button* sender, | 102 void ButtonPressed(views::Button* sender, |
104 const ui::Event& event, | 103 const ui::Event& event, |
105 views::InkDrop* ink_drop); | 104 views::InkDrop* ink_drop); |
106 | 105 |
107 // Wrapper for ShelfView::SameDragType. | 106 // Wrapper for ShelfView::SameDragType. |
108 bool SameDragType(ShelfItemType typea, ShelfItemType typeb) const; | 107 bool SameDragType(ShelfItemType typea, ShelfItemType typeb) const; |
109 | 108 |
110 // Sets ShelfDelegate. | |
111 void SetShelfDelegate(ShelfDelegate* delegate); | |
112 | |
113 // Returns re-insertable bounds in screen. | 109 // Returns re-insertable bounds in screen. |
114 gfx::Rect GetBoundsForDragInsertInScreen(); | 110 gfx::Rect GetBoundsForDragInsertInScreen(); |
115 | 111 |
116 // Returns true if item is ripped off. | 112 // Returns true if item is ripped off. |
117 bool IsRippedOffFromShelf(); | 113 bool IsRippedOffFromShelf(); |
118 | 114 |
119 // Returns true if an item is ripped off and entered into shelf. | 115 // Returns true if an item is ripped off and entered into shelf. |
120 bool DraggedItemFromOverflowToShelf(); | 116 bool DraggedItemFromOverflowToShelf(); |
121 | 117 |
122 // An accessor for |shelf_button_pressed_metric_tracker_|. | 118 // An accessor for |shelf_button_pressed_metric_tracker_|. |
123 ShelfButtonPressedMetricTracker* shelf_button_pressed_metric_tracker(); | 119 ShelfButtonPressedMetricTracker* shelf_button_pressed_metric_tracker(); |
124 | 120 |
125 private: | 121 private: |
126 ShelfView* shelf_view_; | 122 ShelfView* shelf_view_; |
127 | 123 |
128 DISALLOW_COPY_AND_ASSIGN(ShelfViewTestAPI); | 124 DISALLOW_COPY_AND_ASSIGN(ShelfViewTestAPI); |
129 }; | 125 }; |
130 | 126 |
131 } // namespace test | 127 } // namespace test |
132 } // namespace ash | 128 } // namespace ash |
133 | 129 |
134 #endif // ASH_TEST_SHELF_VIEW_TEST_API_H_ | 130 #endif // ASH_TEST_SHELF_VIEW_TEST_API_H_ |
OLD | NEW |