| OLD | NEW | 
|    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 #include <vector> |    8 #include <vector> | 
|    9  |    9  | 
|   10 #include "base/command_line.h" |   10 #include "base/command_line.h" | 
| (...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  319   controller_.reset(new AutocompleteController(profile, this, providers)); |  319   controller_.reset(new AutocompleteController(profile, this, providers)); | 
|  320 } |  320 } | 
|  321  |  321  | 
|  322 SearchBuilder::~SearchBuilder() { |  322 SearchBuilder::~SearchBuilder() { | 
|  323 } |  323 } | 
|  324  |  324  | 
|  325 void SearchBuilder::StartSearch() { |  325 void SearchBuilder::StartSearch() { | 
|  326   // Omnibox features such as keyword selection/accepting and instant query |  326   // Omnibox features such as keyword selection/accepting and instant query | 
|  327   // are not implemented. |  327   // are not implemented. | 
|  328   // TODO(xiyuan): Figure out the features that need to support here. |  328   // TODO(xiyuan): Figure out the features that need to support here. | 
|  329   controller_->Start(search_box_->text(), string16(), false, false, true, |  329   controller_->Start(AutocompleteInput(search_box_->text(), string16::npos, | 
|  330       AutocompleteInput::ALL_MATCHES); |  330                                        string16(), false, false, true, | 
 |  331                                        AutocompleteInput::ALL_MATCHES)); | 
|  331 } |  332 } | 
|  332  |  333  | 
|  333 void SearchBuilder::StopSearch() { |  334 void SearchBuilder::StopSearch() { | 
|  334   controller_->Stop(true); |  335   controller_->Stop(true); | 
|  335 } |  336 } | 
|  336  |  337  | 
|  337 void SearchBuilder::OpenResult(const app_list::SearchResult& result, |  338 void SearchBuilder::OpenResult(const app_list::SearchResult& result, | 
|  338                                int event_flags) { |  339                                int event_flags) { | 
|  339   const SearchBuilderResult* builder_result = |  340   const SearchBuilderResult* builder_result = | 
|  340       static_cast<const SearchBuilderResult*>(&result); |  341       static_cast<const SearchBuilderResult*>(&result); | 
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  432     result->Init(profile_, *it); |  433     result->Init(profile_, *it); | 
|  433     results_->Add(result); |  434     results_->Add(result); | 
|  434   } |  435   } | 
|  435 } |  436 } | 
|  436  |  437  | 
|  437 void SearchBuilder::OnResultChanged(bool default_match_changed) { |  438 void SearchBuilder::OnResultChanged(bool default_match_changed) { | 
|  438   // TODO(xiyuan): Handle default match properly. |  439   // TODO(xiyuan): Handle default match properly. | 
|  439   const AutocompleteResult& ac_result = controller_->result(); |  440   const AutocompleteResult& ac_result = controller_->result(); | 
|  440   PopulateFromACResult(ac_result); |  441   PopulateFromACResult(ac_result); | 
|  441 } |  442 } | 
| OLD | NEW |