OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "chrome/browser/ui/app_list/search/people/people_result.h" | 5 #include "chrome/browser/ui/app_list/search/people/people_result.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 display_name_, | 77 display_name_, |
78 interaction_rank_, | 78 interaction_rank_, |
79 image_url_)).Pass(); | 79 image_url_)).Pass(); |
80 } | 80 } |
81 | 81 |
82 void PeopleResult::OnIconLoaded() { | 82 void PeopleResult::OnIconLoaded() { |
83 // Remove the existing image reps since the icon data is loaded and they | 83 // Remove the existing image reps since the icon data is loaded and they |
84 // need to be re-created. | 84 // need to be re-created. |
85 const std::vector<gfx::ImageSkiaRep>& image_reps = image_.image_reps(); | 85 const std::vector<gfx::ImageSkiaRep>& image_reps = image_.image_reps(); |
86 for (size_t i = 0; i < image_reps.size(); ++i) | 86 for (size_t i = 0; i < image_reps.size(); ++i) |
87 image_.RemoveRepresentation(image_reps[i].scale_factor()); | 87 image_.RemoveRepresentation(image_reps[i].scale()); |
88 | 88 |
89 SetIcon(image_); | 89 SetIcon(image_); |
90 } | 90 } |
91 | 91 |
92 ChromeSearchResultType PeopleResult::GetType() { | 92 ChromeSearchResultType PeopleResult::GetType() { |
93 return SEARCH_PEOPLE_SEARCH_RESULT; | 93 return SEARCH_PEOPLE_SEARCH_RESULT; |
94 } | 94 } |
95 | 95 |
96 } // namespace app_list | 96 } // namespace app_list |
OLD | NEW |