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 3 // found in the LICENSE file. 4 5 #ifndef UI_APP_LIST_VIEWS_TEST_APPS_GRID_VIEW_TEST_API_H_ 6 #define UI_APP_LIST_VIEWS_TEST_APPS_GRID_VIEW_TEST_API_H_ 7 8 #include "base/basictypes.h" 9 10 namespace views { 11 class View; 12 } 13 14 namespace app_list { 15 16 class AppsGridView; 17 18 namespace test { 19 20 class AppsGridViewTestApi { 21 public: 22 explicit AppsGridViewTestApi(AppsGridView* view); 23 ~AppsGridViewTestApi(); 24 25 views::View* GetViewAtModelIndex(int index) const; 26 27 void LayoutToIdealBounds(); 28 29 void SetPageFlipDelay(int page_flip_delay_in_ms); 30 31 void PressItemAt(int index); 32 33 void DisableSynchronousDrag(); 34 35 bool HasPendingPageFlip() const; 36 37 private: 38 AppsGridView* view_; 39 40 DISALLOW_COPY_AND_ASSIGN(AppsGridViewTestApi); 41 }; 42 43 } // namespace test 44 } // namespace app_list 45 46 #endif // UI_APP_LIST_VIEWS_TEST_APPS_GRID_VIEW_TEST_API_H_ 47