Index: ash/test/launcher_view_test_api.cc |
diff --git a/ash/test/launcher_view_test_api.cc b/ash/test/launcher_view_test_api.cc |
index 1e1da4add8178a67b51d3a68a1db258434295703..09ac5146553f372cae1598861f61d1a3963cc07f 100644 |
--- a/ash/test/launcher_view_test_api.cc |
+++ b/ash/test/launcher_view_test_api.cc |
@@ -4,6 +4,7 @@ |
#include "ash/test/launcher_view_test_api.h" |
+#include "ash/launcher/app_list_button.h" |
#include "ash/launcher/launcher_button.h" |
#include "ash/launcher/launcher_model.h" |
#include "ash/launcher/launcher_view.h" |
@@ -77,6 +78,20 @@ const gfx::Rect& LauncherViewTestAPI::GetIdealBoundsByIndex(int index) { |
return launcher_view_->view_model_->ideal_bounds(index); |
} |
+internal::AppListButton* LauncherViewTestAPI::GetAppListButton() { |
+ DCHECK_EQ(launcher_view_->model_->item_count(), |
+ launcher_view_->view_model_->view_size()); |
+ |
+ for (int i = 0; i < launcher_view_->model_->item_count(); ++i) { |
+ if (launcher_view_->model_->items()[i].type == ash::TYPE_APP_LIST) { |
sky
2013/04/29 20:40:55
Isn't this the same as LauncherView::GetAppListBut
xiyuan
2013/04/29 21:12:45
You are absolutely right. I totally forgot that fu
|
+ return static_cast<internal::AppListButton*>( |
+ launcher_view_->view_model_->view_at(i)); |
+ } |
+ } |
+ |
+ return NULL; |
+} |
+ |
void LauncherViewTestAPI::SetAnimationDuration(int duration_ms) { |
launcher_view_->bounds_animator_->SetAnimationDuration(duration_ms); |
} |