| 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 int tiles_per_page() const { return cols_ * rows_per_page_; } | 47 int tiles_per_page() const { return cols_ * rows_per_page_; } |
| 48 | 48 |
| 49 // Overridden from views::View: | 49 // Overridden from views::View: |
| 50 virtual gfx::Size GetPreferredSize() OVERRIDE; | 50 virtual gfx::Size GetPreferredSize() OVERRIDE; |
| 51 virtual void Layout() OVERRIDE; | 51 virtual void Layout() OVERRIDE; |
| 52 virtual bool OnKeyPressed(const views::KeyEvent& event) OVERRIDE; | 52 virtual bool OnKeyPressed(const ui::KeyEvent& event) OVERRIDE; |
| 53 virtual bool OnKeyReleased(const views::KeyEvent& event) OVERRIDE; | 53 virtual bool OnKeyReleased(const ui::KeyEvent& event) OVERRIDE; |
| 54 virtual void OnPaintFocusBorder(gfx::Canvas* canvas) OVERRIDE; | 54 virtual void OnPaintFocusBorder(gfx::Canvas* canvas) OVERRIDE; |
| 55 | 55 |
| 56 private: | 56 private: |
| 57 // Updates from model. | 57 // Updates from model. |
| 58 void Update(); | 58 void Update(); |
| 59 | 59 |
| 60 // Updates total pages and auto select first page is no page is selected. | 60 // Updates total pages and auto select first page is no page is selected. |
| 61 void UpdatePaginationModel(); | 61 void UpdatePaginationModel(); |
| 62 | 62 |
| 63 AppListItemView* CreateViewForItemAtIndex(size_t index); | 63 AppListItemView* CreateViewForItemAtIndex(size_t index); |
| (...skipping 20 matching lines...) Expand all Loading... |
| 84 int rows_per_page_; | 84 int rows_per_page_; |
| 85 | 85 |
| 86 int selected_item_index_; | 86 int selected_item_index_; |
| 87 | 87 |
| 88 DISALLOW_COPY_AND_ASSIGN(AppsGridView); | 88 DISALLOW_COPY_AND_ASSIGN(AppsGridView); |
| 89 }; | 89 }; |
| 90 | 90 |
| 91 } // namespace app_list | 91 } // namespace app_list |
| 92 | 92 |
| 93 #endif // UI_APP_LIST_APPS_GRID_VIEW_H_ | 93 #endif // UI_APP_LIST_APPS_GRID_VIEW_H_ |
| OLD | NEW |