| 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 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 288 DISALLOW_COPY_AND_ASSIGN(ContactResult); | 288 DISALLOW_COPY_AND_ASSIGN(ContactResult); |
| 289 }; | 289 }; |
| 290 #endif | 290 #endif |
| 291 | 291 |
| 292 } // namespace | 292 } // namespace |
| 293 | 293 |
| 294 SearchBuilder::SearchBuilder( | 294 SearchBuilder::SearchBuilder( |
| 295 Profile* profile, | 295 Profile* profile, |
| 296 app_list::SearchBoxModel* search_box, | 296 app_list::SearchBoxModel* search_box, |
| 297 app_list::AppListModel::SearchResults* results, | 297 app_list::AppListModel::SearchResults* results, |
| 298 AppListController* list_controller) | 298 AppListControllerDelegate* list_controller) |
| 299 : profile_(profile), | 299 : profile_(profile), |
| 300 search_box_(search_box), | 300 search_box_(search_box), |
| 301 results_(results), | 301 results_(results), |
| 302 list_controller_(list_controller) { | 302 list_controller_(list_controller) { |
| 303 search_box_->SetHintText( | 303 search_box_->SetHintText( |
| 304 l10n_util::GetStringUTF16(IDS_SEARCH_BOX_HINT)); | 304 l10n_util::GetStringUTF16(IDS_SEARCH_BOX_HINT)); |
| 305 search_box_->SetIcon(*ui::ResourceBundle::GetSharedInstance(). | 305 search_box_->SetIcon(*ui::ResourceBundle::GetSharedInstance(). |
| 306 GetImageSkiaNamed(IDR_OMNIBOX_SEARCH)); | 306 GetImageSkiaNamed(IDR_OMNIBOX_SEARCH)); |
| 307 | 307 |
| 308 // TODO(xiyuan): Consider requesting fewer providers in the non-apps-only | 308 // TODO(xiyuan): Consider requesting fewer providers in the non-apps-only |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 432 result->Init(profile_, *it); | 432 result->Init(profile_, *it); |
| 433 results_->Add(result); | 433 results_->Add(result); |
| 434 } | 434 } |
| 435 } | 435 } |
| 436 | 436 |
| 437 void SearchBuilder::OnResultChanged(bool default_match_changed) { | 437 void SearchBuilder::OnResultChanged(bool default_match_changed) { |
| 438 // TODO(xiyuan): Handle default match properly. | 438 // TODO(xiyuan): Handle default match properly. |
| 439 const AutocompleteResult& ac_result = controller_->result(); | 439 const AutocompleteResult& ac_result = controller_->result(); |
| 440 PopulateFromACResult(ac_result); | 440 PopulateFromACResult(ac_result); |
| 441 } | 441 } |
| OLD | NEW |