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

Side by Side Diff: ui/app_list/views/tile_item_view.cc

Issue 2961923002: Use EnablePlayStoreAppSearch feature flag. (Closed)
Patch Set: Oshima's comment. Created 3 years, 5 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
« no previous file with comments | « ui/app_list/views/tile_item_view.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #include "ui/app_list/views/tile_item_view.h" 5 #include "ui/app_list/views/tile_item_view.h"
6 6
7 #include <utility>
8
7 #include "ui/app_list/app_list_constants.h" 9 #include "ui/app_list/app_list_constants.h"
8 #include "ui/app_list/app_list_features.h" 10 #include "ui/app_list/app_list_features.h"
9 #include "ui/app_list/views/app_list_main_view.h" 11 #include "ui/app_list/views/app_list_main_view.h"
10 #include "ui/gfx/canvas.h" 12 #include "ui/gfx/canvas.h"
11 #include "ui/gfx/image/canvas_image_source.h" 13 #include "ui/gfx/image/canvas_image_source.h"
12 #include "ui/gfx/image/image_skia_operations.h" 14 #include "ui/gfx/image/image_skia_operations.h"
13 #include "ui/views/background.h" 15 #include "ui/views/background.h"
14 #include "ui/views/controls/image_view.h" 16 #include "ui/views/controls/image_view.h"
15 #include "ui/views/controls/label.h" 17 #include "ui/views/controls/label.h"
16 #include "ui/views/layout/box_layout.h" 18 #include "ui/views/layout/box_layout.h"
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 icon_->SetVerticalAlignment(views::ImageView::LEADING); 61 icon_->SetVerticalAlignment(views::ImageView::LEADING);
60 62
61 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); 63 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
62 title_->SetAutoColorReadabilityEnabled(false); 64 title_->SetAutoColorReadabilityEnabled(false);
63 title_->SetEnabledColor(kGridTitleColor); 65 title_->SetEnabledColor(kGridTitleColor);
64 title_->SetFontList(rb.GetFontList(kItemTextFontStyle)); 66 title_->SetFontList(rb.GetFontList(kItemTextFontStyle));
65 title_->SetHorizontalAlignment(gfx::ALIGN_CENTER); 67 title_->SetHorizontalAlignment(gfx::ALIGN_CENTER);
66 title_->SetHandlesTooltips(false); 68 title_->SetHandlesTooltips(false);
67 69
68 AddChildView(icon_); 70 AddChildView(icon_);
69 if (features::IsFullscreenAppListEnabled()) { 71 if (features::IsPlayStoreAppSearchEnabled()) {
70 badge_ = new views::ImageView(); 72 badge_ = new views::ImageView();
71 badge_->set_can_process_events_within_subtree(false); 73 badge_->set_can_process_events_within_subtree(false);
72 badge_->SetVerticalAlignment(views::ImageView::LEADING); 74 badge_->SetVerticalAlignment(views::ImageView::LEADING);
73 AddChildView(badge_); 75 AddChildView(badge_);
74 } 76 }
75 AddChildView(title_); 77 AddChildView(title_);
76 } 78 }
77 79
78 TileItemView::~TileItemView() = default; 80 TileItemView::~TileItemView() = default;
79 81
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 // Tell the label what color it will be drawn onto. It will use whether the 232 // Tell the label what color it will be drawn onto. It will use whether the
231 // background color is opaque or transparent to decide whether to use subpixel 233 // background color is opaque or transparent to decide whether to use subpixel
232 // rendering. Does not actually set the label's background color. 234 // rendering. Does not actually set the label's background color.
233 title_->SetBackgroundColor(background_color); 235 title_->SetBackgroundColor(background_color);
234 236
235 SetBackground(std::move(background)); 237 SetBackground(std::move(background));
236 SchedulePaint(); 238 SchedulePaint();
237 } 239 }
238 240
239 } // namespace app_list 241 } // namespace app_list
OLDNEW
« no previous file with comments | « ui/app_list/views/tile_item_view.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698