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

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

Issue 12623029: Upstreaming mechanism to add query refinement to omnibox searches. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Applied Peter's comments. Created 7 years, 9 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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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_builder.h" 5 #include "chrome/browser/ui/app_list/search_builder.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after
337 } 337 }
338 338
339 SearchBuilder::~SearchBuilder() { 339 SearchBuilder::~SearchBuilder() {
340 } 340 }
341 341
342 void SearchBuilder::StartSearch() { 342 void SearchBuilder::StartSearch() {
343 // Omnibox features such as keyword selection/accepting and instant query 343 // Omnibox features such as keyword selection/accepting and instant query
344 // are not implemented. 344 // are not implemented.
345 // TODO(xiyuan): Figure out the features that need to support here. 345 // TODO(xiyuan): Figure out the features that need to support here.
346 controller_->Start(AutocompleteInput(search_box_->text(), string16::npos, 346 controller_->Start(AutocompleteInput(search_box_->text(), string16::npos,
347 string16(), false, false, true, 347 string16(), GURL(), false, false, true,
348 AutocompleteInput::ALL_MATCHES)); 348 AutocompleteInput::ALL_MATCHES));
349 } 349 }
350 350
351 void SearchBuilder::StopSearch() { 351 void SearchBuilder::StopSearch() {
352 controller_->Stop(true); 352 controller_->Stop(true);
353 } 353 }
354 354
355 void SearchBuilder::OpenResult(const app_list::SearchResult& result, 355 void SearchBuilder::OpenResult(const app_list::SearchResult& result,
356 int event_flags) { 356 int event_flags) {
357 const SearchBuilderResult* builder_result = 357 const SearchBuilderResult* builder_result =
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
452 result->Init(profile_, *it); 452 result->Init(profile_, *it);
453 results_->Add(result); 453 results_->Add(result);
454 } 454 }
455 } 455 }
456 456
457 void SearchBuilder::OnResultChanged(bool default_match_changed) { 457 void SearchBuilder::OnResultChanged(bool default_match_changed) {
458 // TODO(xiyuan): Handle default match properly. 458 // TODO(xiyuan): Handle default match properly.
459 const AutocompleteResult& ac_result = controller_->result(); 459 const AutocompleteResult& ac_result = controller_->result();
460 PopulateFromACResult(ac_result); 460 PopulateFromACResult(ac_result);
461 } 461 }
OLDNEW
« no previous file with comments | « chrome/browser/search_engines/template_url_unittest.cc ('k') | chrome/browser/ui/omnibox/omnibox_edit_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698