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

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: Fixed ChromeOS. 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 325 matching lines...) Expand 10 before | Expand all | Expand 10 after
336 } 336 }
337 337
338 SearchBuilder::~SearchBuilder() { 338 SearchBuilder::~SearchBuilder() {
339 } 339 }
340 340
341 void SearchBuilder::StartSearch() { 341 void SearchBuilder::StartSearch() {
342 // Omnibox features such as keyword selection/accepting and instant query 342 // Omnibox features such as keyword selection/accepting and instant query
343 // are not implemented. 343 // are not implemented.
344 // TODO(xiyuan): Figure out the features that need to support here. 344 // TODO(xiyuan): Figure out the features that need to support here.
345 controller_->Start(AutocompleteInput(search_box_->text(), string16::npos, 345 controller_->Start(AutocompleteInput(search_box_->text(), string16::npos,
346 string16(), false, false, true, 346 string16(), GURL(), false, false, true,
347 AutocompleteInput::ALL_MATCHES)); 347 AutocompleteInput::ALL_MATCHES));
348 } 348 }
349 349
350 void SearchBuilder::StopSearch() { 350 void SearchBuilder::StopSearch() {
351 controller_->Stop(true); 351 controller_->Stop(true);
352 } 352 }
353 353
354 void SearchBuilder::OpenResult(const app_list::SearchResult& result, 354 void SearchBuilder::OpenResult(const app_list::SearchResult& result,
355 int event_flags) { 355 int event_flags) {
356 const SearchBuilderResult* builder_result = 356 const SearchBuilderResult* builder_result =
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
449 result->Init(profile_, *it); 449 result->Init(profile_, *it);
450 results_->Add(result); 450 results_->Add(result);
451 } 451 }
452 } 452 }
453 453
454 void SearchBuilder::OnResultChanged(bool default_match_changed) { 454 void SearchBuilder::OnResultChanged(bool default_match_changed) {
455 // TODO(xiyuan): Handle default match properly. 455 // TODO(xiyuan): Handle default match properly.
456 const AutocompleteResult& ac_result = controller_->result(); 456 const AutocompleteResult& ac_result = controller_->result();
457 PopulateFromACResult(ac_result); 457 PopulateFromACResult(ac_result);
458 } 458 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698