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

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

Issue 2178163002: Add ink drop ripple to shelf overflow button (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed OnClickCanceled Created 4 years, 3 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 class InkDrop;
24 } 24 }
25 25
26 namespace ash { 26 namespace ash {
27 class OverflowBubble; 27 class OverflowBubble;
28 class OverflowButton;
28 class ShelfButton; 29 class ShelfButton;
29 class ShelfButtonPressedMetricTracker; 30 class ShelfButtonPressedMetricTracker;
30 class ShelfDelegate; 31 class ShelfDelegate;
31 class ShelfTooltipManager; 32 class ShelfTooltipManager;
32 class ShelfView; 33 class ShelfView;
33 34
34 namespace test { 35 namespace test {
35 36
36 // Use the api in this class to test ShelfView. 37 // Use the api in this class to test ShelfView.
37 class ShelfViewTestAPI { 38 class ShelfViewTestAPI {
(...skipping 16 matching lines...) Expand all
54 // Gets current/ideal bounds for button at |index|. 55 // Gets current/ideal bounds for button at |index|.
55 const gfx::Rect& GetBoundsByIndex(int index); 56 const gfx::Rect& GetBoundsByIndex(int index);
56 const gfx::Rect& GetIdealBoundsByIndex(int index); 57 const gfx::Rect& GetIdealBoundsByIndex(int index);
57 58
58 // Returns true if overflow button is visible. 59 // Returns true if overflow button is visible.
59 bool IsOverflowButtonVisible(); 60 bool IsOverflowButtonVisible();
60 61
61 // Makes shelf view show its overflow bubble. 62 // Makes shelf view show its overflow bubble.
62 void ShowOverflowBubble(); 63 void ShowOverflowBubble();
63 64
65 // Makes shelf view hide its overflow bubble.
66 void HideOverflowBubble();
67
64 // Sets animation duration in milliseconds for test. 68 // Sets animation duration in milliseconds for test.
65 void SetAnimationDuration(int duration_ms); 69 void SetAnimationDuration(int duration_ms);
66 70
67 // Runs message loop and waits until all add/remove animations are done. 71 // Runs message loop and waits until all add/remove animations are done.
68 void RunMessageLoopUntilAnimationsDone(); 72 void RunMessageLoopUntilAnimationsDone();
69 73
70 // Closes the app list or context menu if it is running. 74 // Closes the app list or context menu if it is running.
71 void CloseMenu(); 75 void CloseMenu();
72 76
73 // An accessor for |shelf_view|. 77 // An accessor for |shelf_view|.
74 ShelfView* shelf_view() { return shelf_view_; } 78 ShelfView* shelf_view() { return shelf_view_; }
75 79
76 // An accessor for the shelf tooltip manager. 80 // An accessor for the shelf tooltip manager.
77 ShelfTooltipManager* tooltip_manager(); 81 ShelfTooltipManager* tooltip_manager();
78 82
79 // An accessor for overflow bubble. 83 // An accessor for overflow bubble.
80 OverflowBubble* overflow_bubble(); 84 OverflowBubble* overflow_bubble();
81 85
86 // An accessor for overflow button.
87 OverflowButton* overflow_button() const;
88
82 // Returns the preferred size of |shelf_view_|. 89 // Returns the preferred size of |shelf_view_|.
83 gfx::Size GetPreferredSize(); 90 gfx::Size GetPreferredSize();
84 91
85 // Returns the button size. 92 // Returns the button size.
86 int GetButtonSize(); 93 int GetButtonSize();
87 94
88 // Returns the button space size. 95 // Returns the button space size.
89 int GetButtonSpacing(); 96 int GetButtonSpacing();
90 97
91 // Returns minimum distance before drag starts. 98 // Returns minimum distance before drag starts.
(...skipping 25 matching lines...) Expand all
117 private: 124 private:
118 ShelfView* shelf_view_; 125 ShelfView* shelf_view_;
119 126
120 DISALLOW_COPY_AND_ASSIGN(ShelfViewTestAPI); 127 DISALLOW_COPY_AND_ASSIGN(ShelfViewTestAPI);
121 }; 128 };
122 129
123 } // namespace test 130 } // namespace test
124 } // namespace ash 131 } // namespace ash
125 132
126 #endif // ASH_TEST_SHELF_VIEW_TEST_API_H_ 133 #endif // ASH_TEST_SHELF_VIEW_TEST_API_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698