OLD | NEW |
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 Loading... |
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 Loading... |
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 } |
OLD | NEW |