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/webui/omnibox/omnibox_ui_handler.h" | 5 #include "chrome/browser/ui/webui/omnibox/omnibox_ui_handler.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/auto_reset.h" | 9 #include "base/auto_reset.h" |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 for (; it != end; ++it, ++i) { | 116 for (; it != end; ++it, ++i) { |
117 std::string item_prefix(prefix + base::StringPrintf(".item_%d", i)); | 117 std::string item_prefix(prefix + base::StringPrintf(".item_%d", i)); |
118 if (it->provider != NULL) { | 118 if (it->provider != NULL) { |
119 output->SetString(item_prefix + ".provider_name", | 119 output->SetString(item_prefix + ".provider_name", |
120 it->provider->GetName()); | 120 it->provider->GetName()); |
121 output->SetBoolean(item_prefix + ".provider_done", it->provider->done()); | 121 output->SetBoolean(item_prefix + ".provider_done", it->provider->done()); |
122 } | 122 } |
123 output->SetInteger(item_prefix + ".relevance", it->relevance); | 123 output->SetInteger(item_prefix + ".relevance", it->relevance); |
124 output->SetBoolean(item_prefix + ".deletable", it->deletable); | 124 output->SetBoolean(item_prefix + ".deletable", it->deletable); |
125 output->SetString(item_prefix + ".fill_into_edit", it->fill_into_edit); | 125 output->SetString(item_prefix + ".fill_into_edit", it->fill_into_edit); |
126 output->SetInteger(item_prefix + ".inline_autocomplete_offset", | 126 output->SetString(item_prefix + ".inline_autocompletion", |
127 it->inline_autocomplete_offset); | 127 it->inline_autocompletion); |
128 output->SetString(item_prefix + ".destination_url", | 128 output->SetString(item_prefix + ".destination_url", |
129 it->destination_url.spec()); | 129 it->destination_url.spec()); |
130 output->SetString(item_prefix + ".contents", it->contents); | 130 output->SetString(item_prefix + ".contents", it->contents); |
131 // At this time, we're not bothering to send along the long vector that | 131 // At this time, we're not bothering to send along the long vector that |
132 // represent contents classification. i.e., for each character, what | 132 // represent contents classification. i.e., for each character, what |
133 // type of text it is. | 133 // type of text it is. |
134 output->SetString(item_prefix + ".description", it->description); | 134 output->SetString(item_prefix + ".description", it->description); |
135 // At this time, we're not bothering to send along the long vector that | 135 // At this time, we're not bothering to send along the long vector that |
136 // represents description classification. i.e., for each character, what | 136 // represents description classification. i.e., for each character, what |
137 // type of text it is. | 137 // type of text it is. |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
201 true, // allow exact keyword matches | 201 true, // allow exact keyword matches |
202 AutocompleteInput::ALL_MATCHES)); // want all matches | 202 AutocompleteInput::ALL_MATCHES)); // want all matches |
203 } | 203 } |
204 | 204 |
205 void OmniboxUIHandler::ResetController() { | 205 void OmniboxUIHandler::ResetController() { |
206 controller_.reset(new AutocompleteController(profile_, this, | 206 controller_.reset(new AutocompleteController(profile_, this, |
207 chrome::IsInstantExtendedAPIEnabled() ? | 207 chrome::IsInstantExtendedAPIEnabled() ? |
208 AutocompleteClassifier::kInstantExtendedOmniboxProviders : | 208 AutocompleteClassifier::kInstantExtendedOmniboxProviders : |
209 AutocompleteClassifier::kDefaultOmniboxProviders)); | 209 AutocompleteClassifier::kDefaultOmniboxProviders)); |
210 } | 210 } |
OLD | NEW |