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

Side by Side Diff: chrome/browser/ui/app_list/search_builder.cc

Issue 10872099: ash: Add support for additional icons in apps search list. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_builder.h" 5 #include "chrome/browser/ui/app_list/search_builder.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "chrome/browser/autocomplete/autocomplete_controller.h" 10 #include "chrome/browser/autocomplete/autocomplete_controller.h"
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 } else { 251 } else {
252 // TODO(xiyuan): What should we do for alternate url case? 252 // TODO(xiyuan): What should we do for alternate url case?
253 chrome::NavigateParams params(profile_, 253 chrome::NavigateParams params(profile_,
254 match.destination_url, 254 match.destination_url,
255 match.transition); 255 match.transition);
256 params.disposition = chrome::DispositionFromEventFlags(event_flags); 256 params.disposition = chrome::DispositionFromEventFlags(event_flags);
257 chrome::Navigate(&params); 257 chrome::Navigate(&params);
258 } 258 }
259 } 259 }
260 260
261 void SearchBuilder::InvokeResultAction(const app_list::SearchResult& result,
262 int action_index,
263 int event_flags) {
264 NOTIMPLEMENTED();
265 }
266
261 void SearchBuilder::PopulateFromACResult(const AutocompleteResult& ac_result) { 267 void SearchBuilder::PopulateFromACResult(const AutocompleteResult& ac_result) {
262 results_->DeleteAll(); 268 results_->DeleteAll();
263 for (ACMatches::const_iterator it = ac_result.begin(); 269 for (ACMatches::const_iterator it = ac_result.begin();
264 it != ac_result.end(); 270 it != ac_result.end();
265 ++it) { 271 ++it) {
266 results_->Add(new SearchBuilderResult(profile_, *it)); 272 results_->Add(new SearchBuilderResult(profile_, *it));
267 } 273 }
268 } 274 }
269 275
270 void SearchBuilder::OnResultChanged(bool default_match_changed) { 276 void SearchBuilder::OnResultChanged(bool default_match_changed) {
271 // TODO(xiyuan): Handle default match properly. 277 // TODO(xiyuan): Handle default match properly.
272 const AutocompleteResult& ac_result = controller_->result(); 278 const AutocompleteResult& ac_result = controller_->result();
273 PopulateFromACResult(ac_result); 279 PopulateFromACResult(ac_result);
274 } 280 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698