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 #include "ash/test/shelf_view_test_api.h" | 5 #include "ash/test/shelf_view_test_api.h" |
6 | 6 |
7 #include "ash/shelf/overflow_button.h" | 7 #include "ash/shelf/overflow_button.h" |
8 #include "ash/shelf/shelf_button.h" | 8 #include "ash/shelf/shelf_button.h" |
9 #include "ash/shelf/shelf_constants.h" | 9 #include "ash/shelf/shelf_constants.h" |
10 #include "ash/shelf/shelf_model.h" | 10 #include "ash/shelf/shelf_model.h" |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 const ui::Event& event, | 143 const ui::Event& event, |
144 views::InkDrop* ink_drop) { | 144 views::InkDrop* ink_drop) { |
145 return shelf_view_->ButtonPressed(sender, event, ink_drop); | 145 return shelf_view_->ButtonPressed(sender, event, ink_drop); |
146 } | 146 } |
147 | 147 |
148 bool ShelfViewTestAPI::SameDragType(ShelfItemType typea, | 148 bool ShelfViewTestAPI::SameDragType(ShelfItemType typea, |
149 ShelfItemType typeb) const { | 149 ShelfItemType typeb) const { |
150 return shelf_view_->SameDragType(typea, typeb); | 150 return shelf_view_->SameDragType(typea, typeb); |
151 } | 151 } |
152 | 152 |
153 void ShelfViewTestAPI::SetShelfDelegate(ShelfDelegate* delegate) { | |
154 shelf_view_->delegate_ = delegate; | |
155 } | |
156 | |
157 gfx::Rect ShelfViewTestAPI::GetBoundsForDragInsertInScreen() { | 153 gfx::Rect ShelfViewTestAPI::GetBoundsForDragInsertInScreen() { |
158 return shelf_view_->GetBoundsForDragInsertInScreen(); | 154 return shelf_view_->GetBoundsForDragInsertInScreen(); |
159 } | 155 } |
160 | 156 |
161 bool ShelfViewTestAPI::IsRippedOffFromShelf() { | 157 bool ShelfViewTestAPI::IsRippedOffFromShelf() { |
162 return shelf_view_->dragged_off_shelf_; | 158 return shelf_view_->dragged_off_shelf_; |
163 } | 159 } |
164 | 160 |
165 bool ShelfViewTestAPI::DraggedItemFromOverflowToShelf() { | 161 bool ShelfViewTestAPI::DraggedItemFromOverflowToShelf() { |
166 return shelf_view_->dragged_off_from_overflow_to_shelf_; | 162 return shelf_view_->dragged_off_from_overflow_to_shelf_; |
167 } | 163 } |
168 | 164 |
169 ShelfButtonPressedMetricTracker* | 165 ShelfButtonPressedMetricTracker* |
170 ShelfViewTestAPI::shelf_button_pressed_metric_tracker() { | 166 ShelfViewTestAPI::shelf_button_pressed_metric_tracker() { |
171 return &(shelf_view_->shelf_button_pressed_metric_tracker_); | 167 return &(shelf_view_->shelf_button_pressed_metric_tracker_); |
172 } | 168 } |
173 | 169 |
174 } // namespace test | 170 } // namespace test |
175 } // namespace ash | 171 } // namespace ash |
OLD | NEW |