| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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/omnibox_provider.h" | 5 #include "chrome/browser/ui/app_list/search/omnibox_provider.h" |
| 6 | 6 |
| 7 #include "chrome/browser/autocomplete/autocomplete_classifier.h" | 7 #include "chrome/browser/autocomplete/autocomplete_classifier.h" |
| 8 #include "chrome/browser/autocomplete/autocomplete_controller.h" | 8 #include "chrome/browser/autocomplete/autocomplete_controller.h" |
| 9 #include "chrome/browser/autocomplete/autocomplete_input.h" | 9 #include "chrome/browser/autocomplete/autocomplete_input.h" |
| 10 #include "chrome/browser/autocomplete/autocomplete_match.h" | 10 #include "chrome/browser/autocomplete/autocomplete_match.h" |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 129 }; | 129 }; |
| 130 | 130 |
| 131 } // namespace | 131 } // namespace |
| 132 | 132 |
| 133 OmniboxProvider::OmniboxProvider(Profile* profile) | 133 OmniboxProvider::OmniboxProvider(Profile* profile) |
| 134 : profile_(profile), | 134 : profile_(profile), |
| 135 controller_(new AutocompleteController( | 135 controller_(new AutocompleteController( |
| 136 profile, | 136 profile, |
| 137 this, | 137 this, |
| 138 AutocompleteClassifier::kDefaultOmniboxProviders)) { | 138 AutocompleteClassifier::kDefaultOmniboxProviders)) { |
| 139 controller_->SetInAppList(); |
| 139 } | 140 } |
| 140 | 141 |
| 141 OmniboxProvider::~OmniboxProvider() {} | 142 OmniboxProvider::~OmniboxProvider() {} |
| 142 | 143 |
| 143 void OmniboxProvider::Start(const base::string16& query) { | 144 void OmniboxProvider::Start(const base::string16& query) { |
| 144 controller_->Start(AutocompleteInput(query, | 145 controller_->Start(AutocompleteInput(query, |
| 145 base::string16::npos, | 146 base::string16::npos, |
| 146 base::string16(), | 147 base::string16(), |
| 147 GURL(), | 148 GURL(), |
| 148 AutocompleteInput::INVALID_SPEC, | 149 AutocompleteInput::INVALID_SPEC, |
| (...skipping 19 matching lines...) Expand all Loading... |
| 168 new OmniboxResult(profile_, *it)).Pass()); | 169 new OmniboxResult(profile_, *it)).Pass()); |
| 169 } | 170 } |
| 170 } | 171 } |
| 171 | 172 |
| 172 void OmniboxProvider::OnResultChanged(bool default_match_changed) { | 173 void OmniboxProvider::OnResultChanged(bool default_match_changed) { |
| 173 const AutocompleteResult& result = controller_->result(); | 174 const AutocompleteResult& result = controller_->result(); |
| 174 PopulateFromACResult(result); | 175 PopulateFromACResult(result); |
| 175 } | 176 } |
| 176 | 177 |
| 177 } // namespace app_list | 178 } // namespace app_list |
| OLD | NEW |