| 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_VIEWS_APPS_GRID_VIEW_H_ | 5 #ifndef UI_APP_LIST_VIEWS_APPS_GRID_VIEW_H_ |
| 6 #define UI_APP_LIST_VIEWS_APPS_GRID_VIEW_H_ | 6 #define UI_APP_LIST_VIEWS_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 "base/timer/timer.h" | 10 #include "base/timer/timer.h" |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 content::WebContents* start_page_contents); | 71 content::WebContents* start_page_contents); |
| 72 virtual ~AppsGridView(); | 72 virtual ~AppsGridView(); |
| 73 | 73 |
| 74 // Sets fixed layout parameters. After setting this, CalculateLayout below | 74 // Sets fixed layout parameters. After setting this, CalculateLayout below |
| 75 // is no longer called to dynamically choosing those layout params. | 75 // is no longer called to dynamically choosing those layout params. |
| 76 void SetLayout(int icon_size, int cols, int rows_per_page); | 76 void SetLayout(int icon_size, int cols, int rows_per_page); |
| 77 | 77 |
| 78 // Sets |model| to use. Note this does not take ownership of |model|. | 78 // Sets |model| to use. Note this does not take ownership of |model|. |
| 79 void SetModel(AppListModel* model); | 79 void SetModel(AppListModel* model); |
| 80 | 80 |
| 81 // Set |apps| to renders. Note this does not take ownership of |apps|. |
| 82 void SetApps(AppListModel::Apps* apps); |
| 83 |
| 81 void SetSelectedView(views::View* view); | 84 void SetSelectedView(views::View* view); |
| 82 void ClearSelectedView(views::View* view); | 85 void ClearSelectedView(views::View* view); |
| 83 bool IsSelectedView(const views::View* view) const; | 86 bool IsSelectedView(const views::View* view) const; |
| 84 | 87 |
| 85 // Ensures the view is visible. Note that if there is a running page | 88 // Ensures the view is visible. Note that if there is a running page |
| 86 // transition, this does nothing. | 89 // transition, this does nothing. |
| 87 void EnsureViewVisible(const views::View* view); | 90 void EnsureViewVisible(const views::View* view); |
| 88 | 91 |
| 89 void InitiateDrag(AppListItemView* view, | 92 void InitiateDrag(AppListItemView* view, |
| 90 Pointer pointer, | 93 Pointer pointer, |
| (...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 265 // Overridden from AppListModelObserver: | 268 // Overridden from AppListModelObserver: |
| 266 virtual void OnAppListModelStatusChanged() OVERRIDE; | 269 virtual void OnAppListModelStatusChanged() OVERRIDE; |
| 267 | 270 |
| 268 // Hide a given view temporarily without losing (mouse) events and / or | 271 // Hide a given view temporarily without losing (mouse) events and / or |
| 269 // changing the size of it. If |immediate| is set the change will be | 272 // changing the size of it. If |immediate| is set the change will be |
| 270 // immediately applied - otherwise it will change gradually. | 273 // immediately applied - otherwise it will change gradually. |
| 271 // If |hide| is set the view will get hidden, otherwise it gets shown. | 274 // If |hide| is set the view will get hidden, otherwise it gets shown. |
| 272 void SetViewHidden(views::View* view, bool hide, bool immediate); | 275 void SetViewHidden(views::View* view, bool hide, bool immediate); |
| 273 | 276 |
| 274 AppListModel* model_; // Owned by AppListView. | 277 AppListModel* model_; // Owned by AppListView. |
| 278 AppListModel::Apps* apps_; // Not owned. |
| 275 AppsGridViewDelegate* delegate_; | 279 AppsGridViewDelegate* delegate_; |
| 276 PaginationModel* pagination_model_; // Owned by AppListController. | 280 PaginationModel* pagination_model_; // Owned by AppListController. |
| 277 PageSwitcher* page_switcher_view_; // Owned by views hierarchy. | 281 PageSwitcher* page_switcher_view_; // Owned by views hierarchy. |
| 278 views::WebView* start_page_view_; // Owned by views hierarchy. | 282 views::WebView* start_page_view_; // Owned by views hierarchy. |
| 279 | 283 |
| 280 gfx::Size icon_size_; | 284 gfx::Size icon_size_; |
| 281 int cols_; | 285 int cols_; |
| 282 int rows_per_page_; | 286 int rows_per_page_; |
| 283 | 287 |
| 284 // Tracks app item views. There is a view per item in |model_|. | 288 // Tracks app item views. There is a view per item in |model_|. |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 333 int page_flip_delay_in_ms_; | 337 int page_flip_delay_in_ms_; |
| 334 | 338 |
| 335 views::BoundsAnimator bounds_animator_; | 339 views::BoundsAnimator bounds_animator_; |
| 336 | 340 |
| 337 DISALLOW_COPY_AND_ASSIGN(AppsGridView); | 341 DISALLOW_COPY_AND_ASSIGN(AppsGridView); |
| 338 }; | 342 }; |
| 339 | 343 |
| 340 } // namespace app_list | 344 } // namespace app_list |
| 341 | 345 |
| 342 #endif // UI_APP_LIST_VIEWS_APPS_GRID_VIEW_H_ | 346 #endif // UI_APP_LIST_VIEWS_APPS_GRID_VIEW_H_ |
| OLD | NEW |