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_APP_LIST_MODEL_VIEW_H_ | 5 #ifndef UI_APP_LIST_APP_LIST_MODEL_VIEW_H_ |
6 #define UI_APP_LIST_APP_LIST_MODEL_VIEW_H_ | 6 #define UI_APP_LIST_APP_LIST_MODEL_VIEW_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "ui/app_list/app_list_export.h" | 9 #include "ui/app_list/app_list_export.h" |
10 #include "ui/app_list/pagination_model_observer.h" | 10 #include "ui/app_list/pagination_model_observer.h" |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 void SetSelectedItemByIndex(int index); | 64 void SetSelectedItemByIndex(int index); |
65 | 65 |
66 // Overridden from views::View: | 66 // Overridden from views::View: |
67 virtual gfx::Size GetPreferredSize() OVERRIDE; | 67 virtual gfx::Size GetPreferredSize() OVERRIDE; |
68 virtual void Layout() OVERRIDE; | 68 virtual void Layout() OVERRIDE; |
69 virtual bool OnKeyPressed(const views::KeyEvent& event) OVERRIDE; | 69 virtual bool OnKeyPressed(const views::KeyEvent& event) OVERRIDE; |
70 virtual bool OnKeyReleased(const views::KeyEvent& event) OVERRIDE; | 70 virtual bool OnKeyReleased(const views::KeyEvent& event) OVERRIDE; |
71 virtual void OnPaintFocusBorder(gfx::Canvas* canvas) OVERRIDE; | 71 virtual void OnPaintFocusBorder(gfx::Canvas* canvas) OVERRIDE; |
72 | 72 |
73 // Overridden from ListModelObserver: | 73 // Overridden from ListModelObserver: |
74 virtual void ListItemsAdded(int start, int count) OVERRIDE; | 74 virtual void ListItemsAdded(size_t start, size_t count) OVERRIDE; |
75 virtual void ListItemsRemoved(int start, int count) OVERRIDE; | 75 virtual void ListItemsRemoved(size_t start, size_t count) OVERRIDE; |
76 virtual void ListItemsChanged(int start, int count) OVERRIDE; | 76 virtual void ListItemsChanged(size_t start, size_t count) OVERRIDE; |
77 | 77 |
78 // Overridden from PaginationModelObserver: | 78 // Overridden from PaginationModelObserver: |
79 virtual void TotalPagesChanged() OVERRIDE; | 79 virtual void TotalPagesChanged() OVERRIDE; |
80 virtual void SelectedPageChanged(int old_selected, int new_selected) OVERRIDE; | 80 virtual void SelectedPageChanged(int old_selected, int new_selected) OVERRIDE; |
81 | 81 |
82 AppListModel* model_; // Owned by parent AppListView. | 82 AppListModel* model_; // Owned by parent AppListView. |
83 views::ButtonListener* listener_; | 83 views::ButtonListener* listener_; |
84 PaginationModel* pagination_model_; // Owned by AppListView. | 84 PaginationModel* pagination_model_; // Owned by AppListView. |
85 | 85 |
86 bool fixed_layout_; | 86 bool fixed_layout_; |
87 gfx::Size icon_size_; | 87 gfx::Size icon_size_; |
88 int cols_; | 88 int cols_; |
89 int rows_per_page_; | 89 int rows_per_page_; |
90 | 90 |
91 int selected_item_index_; | 91 int selected_item_index_; |
92 | 92 |
93 DISALLOW_COPY_AND_ASSIGN(AppListModelView); | 93 DISALLOW_COPY_AND_ASSIGN(AppListModelView); |
94 }; | 94 }; |
95 | 95 |
96 } // namespace app_list | 96 } // namespace app_list |
97 | 97 |
98 #endif // UI_APP_LIST_APP_LIST_MODEL_VIEW_H_ | 98 #endif // UI_APP_LIST_APP_LIST_MODEL_VIEW_H_ |
OLD | NEW |