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

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

Issue 12335141: Move c/b/ui/search/search.* to c/b/instant/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 7 years, 9 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
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/auto_reset.h" 9 #include "base/auto_reset.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
11 #include "base/string16.h" 11 #include "base/string16.h"
12 #include "base/stringprintf.h" 12 #include "base/stringprintf.h"
13 #include "base/time.h" 13 #include "base/time.h"
14 #include "base/values.h" 14 #include "base/values.h"
15 #include "chrome/browser/autocomplete/autocomplete_classifier.h" 15 #include "chrome/browser/autocomplete/autocomplete_classifier.h"
16 #include "chrome/browser/autocomplete/autocomplete_controller.h" 16 #include "chrome/browser/autocomplete/autocomplete_controller.h"
17 #include "chrome/browser/autocomplete/autocomplete_input.h" 17 #include "chrome/browser/autocomplete/autocomplete_input.h"
18 #include "chrome/browser/autocomplete/autocomplete_match.h" 18 #include "chrome/browser/autocomplete/autocomplete_match.h"
19 #include "chrome/browser/autocomplete/autocomplete_provider.h" 19 #include "chrome/browser/autocomplete/autocomplete_provider.h"
20 #include "chrome/browser/instant/search.h"
20 #include "chrome/browser/search_engines/template_url.h" 21 #include "chrome/browser/search_engines/template_url.h"
21 #include "chrome/browser/ui/search/search.h"
22 #include "content/public/browser/web_ui.h" 22 #include "content/public/browser/web_ui.h"
23 23
24 OmniboxUIHandler::OmniboxUIHandler(Profile* profile): profile_(profile) { 24 OmniboxUIHandler::OmniboxUIHandler(Profile* profile): profile_(profile) {
25 ResetController(); 25 ResetController();
26 } 26 }
27 27
28 OmniboxUIHandler::~OmniboxUIHandler() {} 28 OmniboxUIHandler::~OmniboxUIHandler() {}
29 29
30 void OmniboxUIHandler::RegisterMessages() { 30 void OmniboxUIHandler::RegisterMessages() {
31 web_ui()->RegisterMessageCallback("startOmniboxQuery", 31 web_ui()->RegisterMessageCallback("startOmniboxQuery",
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 true, // allow exact keyword matches 171 true, // allow exact keyword matches
172 AutocompleteInput::ALL_MATCHES)); // want all matches 172 AutocompleteInput::ALL_MATCHES)); // want all matches
173 } 173 }
174 174
175 void OmniboxUIHandler::ResetController() { 175 void OmniboxUIHandler::ResetController() {
176 controller_.reset(new AutocompleteController(profile_, this, 176 controller_.reset(new AutocompleteController(profile_, this,
177 chrome::search::IsInstantExtendedAPIEnabled() ? 177 chrome::search::IsInstantExtendedAPIEnabled() ?
178 AutocompleteClassifier::kInstantExtendedOmniboxProviders : 178 AutocompleteClassifier::kInstantExtendedOmniboxProviders :
179 AutocompleteClassifier::kDefaultOmniboxProviders)); 179 AutocompleteClassifier::kDefaultOmniboxProviders));
180 } 180 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/ntp/ntp_resource_cache.cc ('k') | chrome/browser/ui/webui/options/browser_options_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698