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

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: Removed TODO 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
« no previous file with comments | « ash/shelf/shelf_view_unittest.cc ('k') | ash/test/shelf_view_test_api.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
91 // Returns minimum distance before drag starts.
92 int GetMinimumDragDistance() const;
93
87 // Wrapper for ShelfView::ButtonPressed. 94 // Wrapper for ShelfView::ButtonPressed.
88 void ButtonPressed(views::Button* sender, const ui::Event& event); 95 void ButtonPressed(views::Button* sender,
96 const ui::Event& event,
97 views::InkDrop* ink_drop);
89 98
90 // Wrapper for ShelfView::SameDragType. 99 // Wrapper for ShelfView::SameDragType.
91 bool SameDragType(ShelfItemType typea, ShelfItemType typeb) const; 100 bool SameDragType(ShelfItemType typea, ShelfItemType typeb) const;
92 101
93 // Sets ShelfDelegate. 102 // Sets ShelfDelegate.
94 void SetShelfDelegate(ShelfDelegate* delegate); 103 void SetShelfDelegate(ShelfDelegate* delegate);
95 104
96 // Returns re-insertable bounds in screen. 105 // Returns re-insertable bounds in screen.
97 gfx::Rect GetBoundsForDragInsertInScreen(); 106 gfx::Rect GetBoundsForDragInsertInScreen();
98 107
99 // Returns true if item is ripped off. 108 // Returns true if item is ripped off.
100 bool IsRippedOffFromShelf(); 109 bool IsRippedOffFromShelf();
101 110
102 // Returns true if an item is ripped off and entered into shelf. 111 // Returns true if an item is ripped off and entered into shelf.
103 bool DraggedItemFromOverflowToShelf(); 112 bool DraggedItemFromOverflowToShelf();
104 113
105 // An accessor for |shelf_button_pressed_metric_tracker_|. 114 // An accessor for |shelf_button_pressed_metric_tracker_|.
106 ShelfButtonPressedMetricTracker* shelf_button_pressed_metric_tracker(); 115 ShelfButtonPressedMetricTracker* shelf_button_pressed_metric_tracker();
107 116
108 private: 117 private:
109 ShelfView* shelf_view_; 118 ShelfView* shelf_view_;
110 119
111 DISALLOW_COPY_AND_ASSIGN(ShelfViewTestAPI); 120 DISALLOW_COPY_AND_ASSIGN(ShelfViewTestAPI);
112 }; 121 };
113 122
114 } // namespace test 123 } // namespace test
115 } // namespace ash 124 } // namespace ash
116 125
117 #endif // ASH_TEST_SHELF_VIEW_TEST_API_H_ 126 #endif // ASH_TEST_SHELF_VIEW_TEST_API_H_
OLDNEW
« no previous file with comments | « ash/shelf/shelf_view_unittest.cc ('k') | ash/test/shelf_view_test_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698