Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(15)

Side by Side Diff: ash/test/shelf_view_test_api.h

Issue 2033553003: Add MD ink drop ripple to shelf app items (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added tests Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/common/shelf/shelf_item_delegate.h" 8 #include "ash/common/shelf/shelf_item_delegate.h"
9 #include "ash/common/shelf/shelf_item_types.h" 9 #include "ash/common/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 class InkDrop;
23 } 24 }
24 25
25 namespace ash { 26 namespace ash {
26 class OverflowBubble; 27 class OverflowBubble;
27 class ShelfButton; 28 class ShelfButton;
28 class ShelfButtonPressedMetricTracker; 29 class ShelfButtonPressedMetricTracker;
29 class ShelfDelegate; 30 class ShelfDelegate;
30 class ShelfTooltipManager; 31 class ShelfTooltipManager;
31 class ShelfView; 32 class ShelfView;
32 33
(...skipping 26 matching lines...) Expand all
59 60
60 // Makes shelf view show its overflow bubble. 61 // Makes shelf view show its overflow bubble.
61 void ShowOverflowBubble(); 62 void ShowOverflowBubble();
62 63
63 // Sets animation duration in milliseconds for test. 64 // Sets animation duration in milliseconds for test.
64 void SetAnimationDuration(int duration_ms); 65 void SetAnimationDuration(int duration_ms);
65 66
66 // Runs message loop and waits until all add/remove animations are done. 67 // Runs message loop and waits until all add/remove animations are done.
67 void RunMessageLoopUntilAnimationsDone(); 68 void RunMessageLoopUntilAnimationsDone();
68 69
70 // Closes the app list or context menu if it is running.
71 void CloseMenu();
72
69 // An accessor for |shelf_view|. 73 // An accessor for |shelf_view|.
70 ShelfView* shelf_view() { return shelf_view_; } 74 ShelfView* shelf_view() { return shelf_view_; }
71 75
72 // An accessor for the shelf tooltip manager. 76 // An accessor for the shelf tooltip manager.
73 ShelfTooltipManager* tooltip_manager(); 77 ShelfTooltipManager* tooltip_manager();
74 78
75 // An accessor for overflow bubble. 79 // An accessor for overflow bubble.
76 OverflowBubble* overflow_bubble(); 80 OverflowBubble* overflow_bubble();
77 81
78 // Returns the preferred size of |shelf_view_|. 82 // Returns the preferred size of |shelf_view_|.
79 gfx::Size GetPreferredSize(); 83 gfx::Size GetPreferredSize();
80 84
81 // Returns the button size. 85 // Returns the button size.
82 int GetButtonSize(); 86 int GetButtonSize();
83 87
84 // Returns the button space size. 88 // Returns the button space size.
85 int GetButtonSpacing(); 89 int GetButtonSpacing();
86 90
87 // Wrapper for ShelfView::ButtonPressed. 91 // Wrapper for ShelfView::ButtonPressed.
88 void ButtonPressed(views::Button* sender, const ui::Event& event); 92 void ButtonPressed(views::Button* sender,
93 const ui::Event& event,
94 views::InkDrop* ink_drop);
89 95
90 // Wrapper for ShelfView::SameDragType. 96 // Wrapper for ShelfView::SameDragType.
91 bool SameDragType(ShelfItemType typea, ShelfItemType typeb) const; 97 bool SameDragType(ShelfItemType typea, ShelfItemType typeb) const;
92 98
93 // Sets ShelfDelegate. 99 // Sets ShelfDelegate.
94 void SetShelfDelegate(ShelfDelegate* delegate); 100 void SetShelfDelegate(ShelfDelegate* delegate);
95 101
96 // Returns re-insertable bounds in screen. 102 // Returns re-insertable bounds in screen.
97 gfx::Rect GetBoundsForDragInsertInScreen(); 103 gfx::Rect GetBoundsForDragInsertInScreen();
98 104
99 // Returns true if item is ripped off. 105 // Returns true if item is ripped off.
100 bool IsRippedOffFromShelf(); 106 bool IsRippedOffFromShelf();
101 107
102 // Returns true if an item is ripped off and entered into shelf. 108 // Returns true if an item is ripped off and entered into shelf.
103 bool DraggedItemFromOverflowToShelf(); 109 bool DraggedItemFromOverflowToShelf();
104 110
105 // An accessor for |shelf_button_pressed_metric_tracker_|. 111 // An accessor for |shelf_button_pressed_metric_tracker_|.
106 ShelfButtonPressedMetricTracker* shelf_button_pressed_metric_tracker(); 112 ShelfButtonPressedMetricTracker* shelf_button_pressed_metric_tracker();
107 113
108 private: 114 private:
109 ShelfView* shelf_view_; 115 ShelfView* shelf_view_;
110 116
111 DISALLOW_COPY_AND_ASSIGN(ShelfViewTestAPI); 117 DISALLOW_COPY_AND_ASSIGN(ShelfViewTestAPI);
112 }; 118 };
113 119
114 } // namespace test 120 } // namespace test
115 } // namespace ash 121 } // namespace ash
116 122
117 #endif // ASH_TEST_SHELF_VIEW_TEST_API_H_ 123 #endif // ASH_TEST_SHELF_VIEW_TEST_API_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698