| 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 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 160 SigninManagerBase* signin_manager = | 160 SigninManagerBase* signin_manager = |
| 161 SigninManagerFactory::GetInstance()->GetForProfile(profile_); | 161 SigninManagerFactory::GetInstance()->GetForProfile(profile_); |
| 162 DCHECK(signin_manager); | 162 DCHECK(signin_manager); |
| 163 request.from = signin_manager->GetAuthenticatedUsername(); | 163 request.from = signin_manager->GetAuthenticatedUsername(); |
| 164 | 164 |
| 165 // to: list of users with whom to start this hangout is with. | 165 // to: list of users with whom to start this hangout is with. |
| 166 linked_ptr<User> target(new User()); | 166 linked_ptr<User> target(new User()); |
| 167 target->id = person_->owner_id; | 167 target->id = person_->owner_id; |
| 168 request.to.push_back(target); | 168 request.to.push_back(target); |
| 169 | 169 |
| 170 scoped_ptr<extensions::Event> event( | 170 scoped_ptr<extensions::Event> event(new extensions::Event( |
| 171 new extensions::Event(OnHangoutRequested::kEventName, | 171 extensions::events::UNKNOWN, OnHangoutRequested::kEventName, |
| 172 OnHangoutRequested::Create(request))); | 172 OnHangoutRequested::Create(request))); |
| 173 | 173 |
| 174 // TODO(rkc): Change this once we remove the hangoutsPrivate API. | 174 // TODO(rkc): Change this once we remove the hangoutsPrivate API. |
| 175 // See crbug.com/306672 | 175 // See crbug.com/306672 |
| 176 extensions::EventRouter::Get(profile_) | 176 extensions::EventRouter::Get(profile_) |
| 177 ->DispatchEventToExtension(hangouts_extension_id_, event.Pass()); | 177 ->DispatchEventToExtension(hangouts_extension_id_, event.Pass()); |
| 178 | 178 |
| 179 content::RecordAction(base::UserMetricsAction("PeopleSearch_OpenChat")); | 179 content::RecordAction(base::UserMetricsAction("PeopleSearch_OpenChat")); |
| 180 } | 180 } |
| 181 | 181 |
| 182 void PeopleResult::SendEmail() { | 182 void PeopleResult::SendEmail() { |
| (...skipping 11 matching lines...) Expand all 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 |