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 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 break; | 110 break; |
111 case 1: | 111 case 1: |
112 SendEmail(); | 112 SendEmail(); |
113 break; | 113 break; |
114 default: | 114 default: |
115 LOG(ERROR) << "Invalid people search action: " << action_index; | 115 LOG(ERROR) << "Invalid people search action: " << action_index; |
116 } | 116 } |
117 } | 117 } |
118 } | 118 } |
119 | 119 |
120 scoped_ptr<SearchResult> PeopleResult::Duplicate() { | 120 scoped_ptr<SearchResult> PeopleResult::Duplicate() const { |
121 return scoped_ptr<SearchResult>( | 121 return scoped_ptr<SearchResult>( |
122 new PeopleResult(profile_, controller_, person_->Duplicate().Pass())); | 122 new PeopleResult(profile_, controller_, person_->Duplicate().Pass())); |
123 } | 123 } |
124 | 124 |
125 void PeopleResult::OnIconLoaded() { | 125 void PeopleResult::OnIconLoaded() { |
126 // Remove the existing image reps since the icon data is loaded and they | 126 // Remove the existing image reps since the icon data is loaded and they |
127 // need to be re-created. | 127 // need to be re-created. |
128 const std::vector<gfx::ImageSkiaRep>& image_reps = image_.image_reps(); | 128 const std::vector<gfx::ImageSkiaRep>& image_reps = image_.image_reps(); |
129 for (size_t i = 0; i < image_reps.size(); ++i) | 129 for (size_t i = 0; i < image_reps.size(); ++i) |
130 image_.RemoveRepresentation(image_reps[i].scale()); | 130 image_.RemoveRepresentation(image_reps[i].scale()); |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
194 if (extensions::EventRouter::Get(profile_)->ExtensionHasEventListener( | 194 if (extensions::EventRouter::Get(profile_)->ExtensionHasEventListener( |
195 kHangoutsExtensionIds[i], OnHangoutRequested::kEventName)) { | 195 kHangoutsExtensionIds[i], OnHangoutRequested::kEventName)) { |
196 hangouts_extension_id_ = kHangoutsExtensionIds[i]; | 196 hangouts_extension_id_ = kHangoutsExtensionIds[i]; |
197 return; | 197 return; |
198 } | 198 } |
199 } | 199 } |
200 hangouts_extension_id_.clear(); | 200 hangouts_extension_id_.clear(); |
201 } | 201 } |
202 | 202 |
203 } // namespace app_list | 203 } // namespace app_list |
OLD | NEW |