Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1190)

Side by Side Diff: chrome/browser/ui/webui/omnibox/omnibox_ui_handler.cc

Issue 10692075: Enhance chrome://omnibox Presentation (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Tweak layout so that Logged Info does not wrap. Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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/bind.h" 9 #include "base/bind.h"
10 #include "base/string16.h" 10 #include "base/string16.h"
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 // represents description classification. i.e., for each character, what 114 // represents description classification. i.e., for each character, what
115 // type of text it is. 115 // type of text it is.
116 output->SetInteger(item_prefix + ".transition", it->transition); 116 output->SetInteger(item_prefix + ".transition", it->transition);
117 output->SetBoolean(item_prefix + ".is_history_what_you_typed_match", 117 output->SetBoolean(item_prefix + ".is_history_what_you_typed_match",
118 it->is_history_what_you_typed_match); 118 it->is_history_what_you_typed_match);
119 output->SetString(item_prefix + ".type", 119 output->SetString(item_prefix + ".type",
120 AutocompleteMatch::TypeToString(it->type)); 120 AutocompleteMatch::TypeToString(it->type));
121 output->SetString(item_prefix + ".keyword", it->keyword); 121 output->SetString(item_prefix + ".keyword", it->keyword);
122 output->SetBoolean(item_prefix + ".starred", it->starred); 122 output->SetBoolean(item_prefix + ".starred", it->starred);
123 output->SetBoolean(item_prefix + ".from_previous", it->from_previous); 123 output->SetBoolean(item_prefix + ".from_previous", it->from_previous);
124 for (std::map<std::string, std::string>::const_iterator j =
125 it->info_log.begin(); j != it->info_log.end(); ++j)
126 output->SetString(item_prefix + ".log_info." + j->first, j->second);
124 } 127 }
125 output->SetInteger(prefix + ".num_items", i); 128 output->SetInteger(prefix + ".num_items", i);
126 } 129 }
127 130
128 void OmniboxUIHandler::StartOmniboxQuery( 131 void OmniboxUIHandler::StartOmniboxQuery(
129 const base::ListValue* one_element_input_string) { 132 const base::ListValue* one_element_input_string) {
130 string16 input_string = ExtractStringValue(one_element_input_string); 133 string16 input_string = ExtractStringValue(one_element_input_string);
131 string16 empty_string; 134 string16 empty_string;
132 // Tell the autocomplete controller to start working on the 135 // Tell the autocomplete controller to start working on the
133 // input. It's okay if the previous request hasn't yet finished; 136 // input. It's okay if the previous request hasn't yet finished;
134 // the autocomplete controller is smart enough to stop the previous 137 // the autocomplete controller is smart enough to stop the previous
135 // query before it starts the new one. By the way, in this call to 138 // query before it starts the new one. By the way, in this call to
136 // Start(), we use the default/typical values for all parameters. 139 // Start(), we use the default/typical values for all parameters.
137 time_omnibox_started_ = base::Time::Now(); 140 time_omnibox_started_ = base::Time::Now();
138 controller_->Start(input_string, 141 controller_->Start(input_string,
139 empty_string, // user's desired tld (top-level domain) 142 empty_string, // user's desired tld (top-level domain)
140 false, // don't prevent inline autocompletion 143 false, // don't prevent inline autocompletion
141 false, // no preferred keyword provider 144 false, // no preferred keyword provider
142 true, // allow exact keyword matches 145 true, // allow exact keyword matches
143 AutocompleteInput::ALL_MATCHES); // want all matches 146 AutocompleteInput::ALL_MATCHES); // want all matches
144 } 147 }
OLDNEW
« chrome/browser/resources/omnibox/omnibox.js ('K') | « chrome/browser/resources/omnibox/omnibox.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698