Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(70)

Side by Side Diff: ui/app_list/views/apps_grid_view.h

Issue 466293002: Hardcode applist icon dimension and shadows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: s/kPreferredIconDimension/kGridIconDimension/g, move header Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 10
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 TOUCH, 66 TOUCH,
67 }; 67 };
68 68
69 // Constructs the app icon grid view. |delegate| is the delegate of this 69 // Constructs the app icon grid view. |delegate| is the delegate of this
70 // view, which usually is the hosting AppListView. 70 // view, which usually is the hosting AppListView.
71 explicit AppsGridView(AppsGridViewDelegate* delegate); 71 explicit AppsGridView(AppsGridViewDelegate* delegate);
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 cols, int rows_per_page);
77 77
78 int cols() const { return cols_; } 78 int cols() const { return cols_; }
79 int rows_per_page() const { return rows_per_page_; } 79 int rows_per_page() const { return rows_per_page_; }
80 80
81 // This resets the grid view to a fresh state for showing the app list. 81 // This resets the grid view to a fresh state for showing the app list.
82 void ResetForShowApps(); 82 void ResetForShowApps();
83 83
84 // Sets |model| to use. Note this does not take ownership of |model|. 84 // Sets |model| to use. Note this does not take ownership of |model|.
85 void SetModel(AppListModel* model); 85 void SetModel(AppListModel* model);
86 86
(...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after
457 AppListModel* model_; // Owned by AppListView. 457 AppListModel* model_; // Owned by AppListView.
458 AppListItemList* item_list_; // Not owned. 458 AppListItemList* item_list_; // Not owned.
459 AppsGridViewDelegate* delegate_; 459 AppsGridViewDelegate* delegate_;
460 460
461 // This can be NULL. Only grid views inside folders have a folder delegate. 461 // This can be NULL. Only grid views inside folders have a folder delegate.
462 AppsGridViewFolderDelegate* folder_delegate_; 462 AppsGridViewFolderDelegate* folder_delegate_;
463 463
464 PaginationModel pagination_model_; 464 PaginationModel pagination_model_;
465 PageSwitcher* page_switcher_view_; // Owned by views hierarchy. 465 PageSwitcher* page_switcher_view_; // Owned by views hierarchy.
466 466
467 gfx::Size icon_size_;
468 int cols_; 467 int cols_;
469 int rows_per_page_; 468 int rows_per_page_;
470 469
471 // Tracks app item views. There is a view per item in |model_|. 470 // Tracks app item views. There is a view per item in |model_|.
472 views::ViewModel view_model_; 471 views::ViewModel view_model_;
473 472
474 // Tracks pulsing block views. 473 // Tracks pulsing block views.
475 views::ViewModel pulsing_blocks_model_; 474 views::ViewModel pulsing_blocks_model_;
476 475
477 views::View* selected_view_; 476 views::View* selected_view_;
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
547 546
548 // True if the drag_view_ item is a folder item being dragged for reparenting. 547 // True if the drag_view_ item is a folder item being dragged for reparenting.
549 bool dragging_for_reparent_item_; 548 bool dragging_for_reparent_item_;
550 549
551 DISALLOW_COPY_AND_ASSIGN(AppsGridView); 550 DISALLOW_COPY_AND_ASSIGN(AppsGridView);
552 }; 551 };
553 552
554 } // namespace app_list 553 } // namespace app_list
555 554
556 #endif // UI_APP_LIST_VIEWS_APPS_GRID_VIEW_H_ 555 #endif // UI_APP_LIST_VIEWS_APPS_GRID_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698