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

Unified Diff: trunk/src/ui/app_list/views/app_list_main_view.cc

Issue 24262008: Revert 224473 "Remove dependency on ui::ScaleFactor from ui/gfx" (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years, 3 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 | « trunk/src/ui/app_list/views/app_list_item_view.cc ('k') | trunk/src/ui/app_list/views/cached_label.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/src/ui/app_list/views/app_list_main_view.cc
===================================================================
--- trunk/src/ui/app_list/views/app_list_main_view.cc (revision 224498)
+++ trunk/src/ui/app_list/views/app_list_main_view.cc (working copy)
@@ -43,13 +43,13 @@
public:
IconLoader(AppListMainView* owner,
AppListItemModel* item,
- float scale)
+ ui::ScaleFactor scale_factor)
: owner_(owner),
item_(item) {
item_->AddObserver(this);
// Triggers icon loading for given |scale_factor|.
- item_->icon().GetRepresentation(scale);
+ item_->icon().GetRepresentation(scale_factor);
}
virtual ~IconLoader() {
@@ -147,7 +147,6 @@
if (parent)
scale_factor = ui::GetScaleFactorForNativeView(parent);
- float scale = ui::GetImageScale(scale_factor);
// |pagination_model| could have -1 as the initial selected page and
// assumes first page (i.e. index 0) will be used in this case.
const int selected_page = std::max(0, pagination_model->selected_page());
@@ -161,10 +160,10 @@
pending_icon_loaders_.clear();
for (int i = start_model_index; i < end_model_index; ++i) {
AppListItemModel* item = model_->apps()->GetItemAt(i);
- if (item->icon().HasRepresentation(scale))
+ if (item->icon().HasRepresentation(scale_factor))
continue;
- pending_icon_loaders_.push_back(new IconLoader(this, item, scale));
+ pending_icon_loaders_.push_back(new IconLoader(this, item, scale_factor));
}
}
« no previous file with comments | « trunk/src/ui/app_list/views/app_list_item_view.cc ('k') | trunk/src/ui/app_list/views/cached_label.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698