| 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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 return url.Resolve(kImageSizePath + image_filename); | 54 return url.Resolve(kImageSizePath + image_filename); |
| 55 } | 55 } |
| 56 | 56 |
| 57 } // namespace | 57 } // namespace |
| 58 | 58 |
| 59 namespace app_list { | 59 namespace app_list { |
| 60 | 60 |
| 61 PeopleResult::PeopleResult(Profile* profile, scoped_ptr<Person> person) | 61 PeopleResult::PeopleResult(Profile* profile, scoped_ptr<Person> person) |
| 62 : profile_(profile), person_(person.Pass()), weak_factory_(this) { | 62 : profile_(profile), person_(person.Pass()), weak_factory_(this) { |
| 63 set_id(person_->id); | 63 set_id(person_->id); |
| 64 set_title(UTF8ToUTF16(person_->display_name)); | 64 set_title(base::UTF8ToUTF16(person_->display_name)); |
| 65 set_relevance(person_->interaction_rank); | 65 set_relevance(person_->interaction_rank); |
| 66 set_details(UTF8ToUTF16(person_->email)); | 66 set_details(base::UTF8ToUTF16(person_->email)); |
| 67 | 67 |
| 68 RefreshHangoutsExtensionId(); | 68 RefreshHangoutsExtensionId(); |
| 69 SetDefaultActions(); | 69 SetDefaultActions(); |
| 70 | 70 |
| 71 image_ = gfx::ImageSkia( | 71 image_ = gfx::ImageSkia( |
| 72 new UrlIconSource(base::Bind(&PeopleResult::OnIconLoaded, | 72 new UrlIconSource(base::Bind(&PeopleResult::OnIconLoaded, |
| 73 weak_factory_.GetWeakPtr()), | 73 weak_factory_.GetWeakPtr()), |
| 74 profile_->GetRequestContext(), | 74 profile_->GetRequestContext(), |
| 75 GetImageUrl(person_->image_url), | 75 GetImageUrl(person_->image_url), |
| 76 kIconSize, | 76 kIconSize, |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 191 } | 191 } |
| 192 } | 192 } |
| 193 hangouts_extension_id_.clear(); | 193 hangouts_extension_id_.clear(); |
| 194 } | 194 } |
| 195 | 195 |
| 196 ChromeSearchResultType PeopleResult::GetType() { | 196 ChromeSearchResultType PeopleResult::GetType() { |
| 197 return SEARCH_PEOPLE_SEARCH_RESULT; | 197 return SEARCH_PEOPLE_SEARCH_RESULT; |
| 198 } | 198 } |
| 199 | 199 |
| 200 } // namespace app_list | 200 } // namespace app_list |
| OLD | NEW |