Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(458)

Side by Side Diff: chrome/browser/ui/app_list/search/people/people_result.cc

Issue 562603002: Move PageTransition from //content/public/common to //ui/base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 // See crbug.com/306672 167 // See crbug.com/306672
168 extensions::EventRouter::Get(profile_) 168 extensions::EventRouter::Get(profile_)
169 ->DispatchEventToExtension(hangouts_extension_id_, event.Pass()); 169 ->DispatchEventToExtension(hangouts_extension_id_, event.Pass());
170 170
171 content::RecordAction(base::UserMetricsAction("PeopleSearch_OpenChat")); 171 content::RecordAction(base::UserMetricsAction("PeopleSearch_OpenChat"));
172 } 172 }
173 173
174 void PeopleResult::SendEmail() { 174 void PeopleResult::SendEmail() {
175 chrome::NavigateParams params(profile_, 175 chrome::NavigateParams params(profile_,
176 GURL(kEmailUrlPrefix + person_->email), 176 GURL(kEmailUrlPrefix + person_->email),
177 content::PAGE_TRANSITION_LINK); 177 ui::PAGE_TRANSITION_LINK);
178 // If no window exists, this will open a new window this one tab. 178 // If no window exists, this will open a new window this one tab.
179 params.disposition = NEW_FOREGROUND_TAB; 179 params.disposition = NEW_FOREGROUND_TAB;
180 chrome::Navigate(&params); 180 chrome::Navigate(&params);
181 content::RecordAction(base::UserMetricsAction("PeopleSearch_SendEmail")); 181 content::RecordAction(base::UserMetricsAction("PeopleSearch_SendEmail"));
182 } 182 }
183 183
184 void PeopleResult::RefreshHangoutsExtensionId() { 184 void PeopleResult::RefreshHangoutsExtensionId() {
185 // TODO(rkc): Change this once we remove the hangoutsPrivate API. 185 // TODO(rkc): Change this once we remove the hangoutsPrivate API.
186 // See crbug.com/306672 186 // See crbug.com/306672
187 for (size_t i = 0; i < arraysize(kHangoutsExtensionIds); ++i) { 187 for (size_t i = 0; i < arraysize(kHangoutsExtensionIds); ++i) {
188 if (extensions::EventRouter::Get(profile_)->ExtensionHasEventListener( 188 if (extensions::EventRouter::Get(profile_)->ExtensionHasEventListener(
189 kHangoutsExtensionIds[i], OnHangoutRequested::kEventName)) { 189 kHangoutsExtensionIds[i], OnHangoutRequested::kEventName)) {
190 hangouts_extension_id_ = kHangoutsExtensionIds[i]; 190 hangouts_extension_id_ = kHangoutsExtensionIds[i];
191 return; 191 return;
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
OLDNEW
« no previous file with comments | « chrome/browser/ui/app_list/app_list_view_delegate.cc ('k') | chrome/browser/ui/app_list/search/search_webstore_result.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698