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

Unified Diff: ui/app_list/views/apps_grid_view.cc

Issue 2938953003: Remove redundant IsFullscreenAppListEnabled() (Closed)
Patch Set: bool->const bool Created 3 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/app_list/views/apps_grid_view.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/app_list/views/apps_grid_view.cc
diff --git a/ui/app_list/views/apps_grid_view.cc b/ui/app_list/views/apps_grid_view.cc
index bbd8fd5b38f455403fffec4f09a47f74d4edc7a5..8bc5d7362c39ca063015f82247ed29162970720e 100644
--- a/ui/app_list/views/apps_grid_view.cc
+++ b/ui/app_list/views/apps_grid_view.cc
@@ -220,7 +220,8 @@ AppsGridView::AppsGridView(AppsGridViewDelegate* delegate)
page_flip_delay_in_ms_(kPageFlipDelayInMs),
bounds_animator_(this),
activated_folder_item_view_(NULL),
- dragging_for_reparent_item_(false) {
+ dragging_for_reparent_item_(false),
+ is_fullscreen_app_list_enabled_(features::IsFullscreenAppListEnabled()) {
SetPaintToLayer();
// Clip any icons that are outside the grid view's bounds. These icons would
// otherwise be visible to the user when the grid view is off screen.
@@ -232,7 +233,7 @@ AppsGridView::AppsGridView(AppsGridViewDelegate* delegate)
pagination_model_.AddObserver(this);
- if (features::IsFullscreenAppListEnabled()) {
+ if (is_fullscreen_app_list_enabled_) {
page_switcher_view_ = new PageSwitcherVertical(&pagination_model_);
pagination_controller_.reset(new PaginationController(
&pagination_model_, PaginationController::SCROLL_AXIS_VERTICAL));
@@ -640,7 +641,7 @@ bool AppsGridView::IsAnimatingView(AppListItemView* view) {
gfx::Size AppsGridView::CalculatePreferredSize() const {
const gfx::Insets insets(GetInsets());
gfx::Size size = GetTileGridSize();
- if (features::IsFullscreenAppListEnabled()) {
+ if (is_fullscreen_app_list_enabled_) {
// If we are in a folder, ignore the page switcher for width calculations.
int page_switcher_width =
folder_delegate_ ? 0 : page_switcher_view_->GetPreferredSize().width();
@@ -683,7 +684,7 @@ void AppsGridView::Layout() {
views::ViewModelUtils::SetViewBoundsToIdealBounds(pulsing_blocks_model_);
gfx::Rect rect(GetContentsBounds());
- if (features::IsFullscreenAppListEnabled()) {
+ if (is_fullscreen_app_list_enabled_) {
const int page_switcher_width =
page_switcher_view_->GetPreferredSize().width();
rect.set_x(rect.right() - page_switcher_width);
« no previous file with comments | « ui/app_list/views/apps_grid_view.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698