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

Unified Diff: chrome/browser/ui/webui/omnibox/omnibox_ui_handler.cc

Issue 882883006: Remove Client= relationship in omnibox.mojom (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/webui/omnibox/omnibox_ui_handler.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/omnibox/omnibox_ui_handler.cc
diff --git a/chrome/browser/ui/webui/omnibox/omnibox_ui_handler.cc b/chrome/browser/ui/webui/omnibox/omnibox_ui_handler.cc
index 2301d872cbc44b1ebc9b2530f1fa65f16ec11e7b..644d4b282ea948ed96bf03e191f6feb005553d0c 100644
--- a/chrome/browser/ui/webui/omnibox/omnibox_ui_handler.cc
+++ b/chrome/browser/ui/webui/omnibox/omnibox_ui_handler.cc
@@ -114,7 +114,8 @@ OmniboxUIHandler::OmniboxUIHandler(Profile* profile)
ResetController();
}
-OmniboxUIHandler::~OmniboxUIHandler() {}
+OmniboxUIHandler::~OmniboxUIHandler() {
+}
void OmniboxUIHandler::OnResultChanged(bool default_match_changed) {
OmniboxResultMojoPtr result(OmniboxResultMojo::New());
@@ -159,7 +160,7 @@ void OmniboxUIHandler::OnResultChanged(bool default_match_changed) {
}
}
- client()->HandleNewAutocompleteResult(result.Pass());
+ page_->HandleNewAutocompleteResult(result.Pass());
}
bool OmniboxUIHandler::LookupIsTypedHost(const base::string16& host,
@@ -179,13 +180,15 @@ void OmniboxUIHandler::StartOmniboxQuery(const mojo::String& input_string,
int32_t cursor_position,
bool prevent_inline_autocomplete,
bool prefer_keyword,
- int32_t page_classification) {
+ int32_t page_classification,
+ OmniboxPagePtr page) {
// Reset the controller. If we don't do this, then the
// AutocompleteController might inappropriately set its |minimal_changes|
// variable (or something else) and some providers will short-circuit
// important logic and return stale results. In short, we want the
// actual results to not depend on the state of the previous request.
ResetController();
+ page_ = page.Pass();
time_omnibox_started_ = base::Time::Now();
input_ = AutocompleteInput(
input_string.To<base::string16>(), cursor_position, std::string(), GURL(),
« no previous file with comments | « chrome/browser/ui/webui/omnibox/omnibox_ui_handler.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698