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

Unified Diff: ash/test/shelf_view_test_api.cc

Issue 2575613002: Remove ShelfItemDelegate::IsDraggable; check for app list button. (Closed)
Patch Set: Created 4 years 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 side-by-side diff with in-line comments
Download patch
Index: ash/test/shelf_view_test_api.cc
diff --git a/ash/test/shelf_view_test_api.cc b/ash/test/shelf_view_test_api.cc
index c9ff178cbc0bf44d073f09ef2d7f9e70f5c7fb3a..92afe5db3bb10c3486847aaa680032aa9bb38dae 100644
--- a/ash/test/shelf_view_test_api.cc
+++ b/ash/test/shelf_view_test_api.cc
@@ -50,9 +50,13 @@ int ShelfViewTestAPI::GetButtonCount() {
ShelfButton* ShelfViewTestAPI::GetButton(int index) {
// App list button is not a ShelfButton.
if (shelf_view_->model_->items()[index].type == ash::TYPE_APP_LIST)
- return NULL;
+ return nullptr;
- return static_cast<ShelfButton*>(shelf_view_->view_model_->view_at(index));
+ return static_cast<ShelfButton*>(GetViewAt(index));
+}
+
+views::View* ShelfViewTestAPI::GetViewAt(int index) {
+ return shelf_view_->view_model_->view_at(index);
}
int ShelfViewTestAPI::GetFirstVisibleIndex() {

Powered by Google App Engine
This is Rietveld 408576698