| 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 #ifndef UI_APP_LIST_APPS_GRID_VIEW_H_ | 5 #ifndef UI_APP_LIST_APPS_GRID_VIEW_H_ |
| 6 #define UI_APP_LIST_APPS_GRID_VIEW_H_ | 6 #define UI_APP_LIST_APPS_GRID_VIEW_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "ui/app_list/app_list_export.h" | 10 #include "ui/app_list/app_list_export.h" |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 | 37 |
| 38 // Sets |model| to use. Note this does not take ownership of |model|. | 38 // Sets |model| to use. Note this does not take ownership of |model|. |
| 39 void SetModel(AppListModel::Apps* model); | 39 void SetModel(AppListModel::Apps* model); |
| 40 | 40 |
| 41 void SetSelectedItem(AppListItemView* item); | 41 void SetSelectedItem(AppListItemView* item); |
| 42 void ClearSelectedItem(AppListItemView* item); | 42 void ClearSelectedItem(AppListItemView* item); |
| 43 bool IsSelectedItem(const AppListItemView* item) const; | 43 bool IsSelectedItem(const AppListItemView* item) const; |
| 44 | 44 |
| 45 void EnsureItemVisible(const AppListItemView* item); | 45 void EnsureItemVisible(const AppListItemView* item); |
| 46 | 46 |
| 47 bool HasPageTransition() const; |
| 48 |
| 47 int tiles_per_page() const { return cols_ * rows_per_page_; } | 49 int tiles_per_page() const { return cols_ * rows_per_page_; } |
| 48 | 50 |
| 49 // Overridden from views::View: | 51 // Overridden from views::View: |
| 50 virtual gfx::Size GetPreferredSize() OVERRIDE; | 52 virtual gfx::Size GetPreferredSize() OVERRIDE; |
| 51 virtual void Layout() OVERRIDE; | 53 virtual void Layout() OVERRIDE; |
| 52 virtual bool OnKeyPressed(const ui::KeyEvent& event) OVERRIDE; | 54 virtual bool OnKeyPressed(const ui::KeyEvent& event) OVERRIDE; |
| 53 virtual bool OnKeyReleased(const ui::KeyEvent& event) OVERRIDE; | 55 virtual bool OnKeyReleased(const ui::KeyEvent& event) OVERRIDE; |
| 54 virtual void OnPaintFocusBorder(gfx::Canvas* canvas) OVERRIDE; | 56 virtual void OnPaintFocusBorder(gfx::Canvas* canvas) OVERRIDE; |
| 55 virtual void ViewHierarchyChanged(bool is_add, | 57 virtual void ViewHierarchyChanged(bool is_add, |
| 56 views::View* parent, | 58 views::View* parent, |
| (...skipping 30 matching lines...) Expand all Loading... |
| 87 int rows_per_page_; | 89 int rows_per_page_; |
| 88 | 90 |
| 89 int selected_item_index_; | 91 int selected_item_index_; |
| 90 | 92 |
| 91 DISALLOW_COPY_AND_ASSIGN(AppsGridView); | 93 DISALLOW_COPY_AND_ASSIGN(AppsGridView); |
| 92 }; | 94 }; |
| 93 | 95 |
| 94 } // namespace app_list | 96 } // namespace app_list |
| 95 | 97 |
| 96 #endif // UI_APP_LIST_APPS_GRID_VIEW_H_ | 98 #endif // UI_APP_LIST_APPS_GRID_VIEW_H_ |
| OLD | NEW |