| 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 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 145 | 145 |
| 146 void PeopleResult::OpenChat() { | 146 void PeopleResult::OpenChat() { |
| 147 HangoutRequest request; | 147 HangoutRequest request; |
| 148 | 148 |
| 149 request.type = extensions::api::hangouts_private::HANGOUT_TYPE_CHAT; | 149 request.type = extensions::api::hangouts_private::HANGOUT_TYPE_CHAT; |
| 150 | 150 |
| 151 // from: the user this chat request is originating from. | 151 // from: the user this chat request is originating from. |
| 152 SigninManagerBase* signin_manager = | 152 SigninManagerBase* signin_manager = |
| 153 SigninManagerFactory::GetInstance()->GetForProfile(profile_); | 153 SigninManagerFactory::GetInstance()->GetForProfile(profile_); |
| 154 DCHECK(signin_manager); | 154 DCHECK(signin_manager); |
| 155 request.from = signin_manager->GetAuthenticatedAccountId(); | 155 request.from = signin_manager->GetAuthenticatedUsername(); |
| 156 | 156 |
| 157 // to: list of users with whom to start this hangout is with. | 157 // to: list of users with whom to start this hangout is with. |
| 158 linked_ptr<User> target(new User()); | 158 linked_ptr<User> target(new User()); |
| 159 target->id = person_->owner_id; | 159 target->id = person_->owner_id; |
| 160 request.to.push_back(target); | 160 request.to.push_back(target); |
| 161 | 161 |
| 162 scoped_ptr<extensions::Event> event( | 162 scoped_ptr<extensions::Event> event( |
| 163 new extensions::Event(OnHangoutRequested::kEventName, | 163 new extensions::Event(OnHangoutRequested::kEventName, |
| 164 OnHangoutRequested::Create(request))); | 164 OnHangoutRequested::Create(request))); |
| 165 | 165 |
| (...skipping 26 matching lines...) Expand all Loading... |
| 192 } | 192 } |
| 193 } | 193 } |
| 194 hangouts_extension_id_.clear(); | 194 hangouts_extension_id_.clear(); |
| 195 } | 195 } |
| 196 | 196 |
| 197 ChromeSearchResultType PeopleResult::GetType() { | 197 ChromeSearchResultType PeopleResult::GetType() { |
| 198 return SEARCH_PEOPLE_SEARCH_RESULT; | 198 return SEARCH_PEOPLE_SEARCH_RESULT; |
| 199 } | 199 } |
| 200 | 200 |
| 201 } // namespace app_list | 201 } // namespace app_list |
| OLD | NEW |