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

Unified Diff: ash/test/launcher_view_test_api.cc

Issue 13993027: ash: Update app list button. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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 side-by-side diff with in-line comments
Download patch
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);
}

Powered by Google App Engine
This is Rietveld 408576698