Chromium Code Reviews| 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/common/shelf/shelf_item_delegate.h" | |
| 9 #include "ash/common/shelf/shelf_item_types.h" | 8 #include "ash/common/shelf/shelf_item_types.h" |
| 10 #include "base/macros.h" | 9 #include "base/macros.h" |
| 11 | 10 |
| 12 namespace gfx { | 11 namespace gfx { |
| 13 class Rect; | 12 class Rect; |
| 14 class Size; | 13 class Size; |
| 15 } | 14 } |
| 16 | 15 |
| 17 namespace ui { | 16 namespace ui { |
| 18 class Event; | 17 class Event; |
| 19 } | 18 } |
| 20 | 19 |
| 21 namespace views { | 20 namespace views { |
| 22 class Button; | 21 class Button; |
| 23 class InkDrop; | 22 class InkDrop; |
| 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; | 31 class ShelfDelegate; |
| 32 class ShelfTooltipManager; | 32 class ShelfTooltipManager; |
| 33 class ShelfView; | 33 class ShelfView; |
| 34 | 34 |
| 35 namespace test { | 35 namespace test { |
| 36 | 36 |
| 37 // Use the api in this class to test ShelfView. | 37 // Use the api in this class to test ShelfView. |
| 38 class ShelfViewTestAPI { | 38 class ShelfViewTestAPI { |
| 39 public: | 39 public: |
| 40 explicit ShelfViewTestAPI(ShelfView* shelf_view); | 40 explicit ShelfViewTestAPI(ShelfView* shelf_view); |
| 41 ~ShelfViewTestAPI(); | 41 ~ShelfViewTestAPI(); |
| 42 | 42 |
| 43 // Number of icons displayed. | 43 // Number of icons displayed. |
| 44 int GetButtonCount(); | 44 int GetButtonCount(); |
| 45 | 45 |
| 46 // Retrieve the button at |index|. | 46 // Retrieve the button at |index|, doesn't support the app list button. |
|
James Cook
2016/12/14 17:41:54
nit: add // because the app list button is not a S
msw
2016/12/14 19:46:50
Done (but hopefully I'll change that in the future
| |
| 47 ShelfButton* GetButton(int index); | 47 ShelfButton* GetButton(int index); |
| 48 | 48 |
| 49 // Retrieve the view at |index|. | |
| 50 views::View* GetViewAt(int index); | |
| 51 | |
| 49 // First visible button index. | 52 // First visible button index. |
| 50 int GetFirstVisibleIndex(); | 53 int GetFirstVisibleIndex(); |
| 51 | 54 |
| 52 // Last visible button index. | 55 // Last visible button index. |
| 53 int GetLastVisibleIndex(); | 56 int GetLastVisibleIndex(); |
| 54 | 57 |
| 55 // Gets current/ideal bounds for button at |index|. | 58 // Gets current/ideal bounds for button at |index|. |
| 56 const gfx::Rect& GetBoundsByIndex(int index); | 59 const gfx::Rect& GetBoundsByIndex(int index); |
| 57 const gfx::Rect& GetIdealBoundsByIndex(int index); | 60 const gfx::Rect& GetIdealBoundsByIndex(int index); |
| 58 | 61 |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 127 private: | 130 private: |
| 128 ShelfView* shelf_view_; | 131 ShelfView* shelf_view_; |
| 129 | 132 |
| 130 DISALLOW_COPY_AND_ASSIGN(ShelfViewTestAPI); | 133 DISALLOW_COPY_AND_ASSIGN(ShelfViewTestAPI); |
| 131 }; | 134 }; |
| 132 | 135 |
| 133 } // namespace test | 136 } // namespace test |
| 134 } // namespace ash | 137 } // namespace ash |
| 135 | 138 |
| 136 #endif // ASH_TEST_SHELF_VIEW_TEST_API_H_ | 139 #endif // ASH_TEST_SHELF_VIEW_TEST_API_H_ |
| OLD | NEW |