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

Unified Diff: chrome/renderer/searchbox/searchbox.cc

Issue 741593003: Merge: Propagate the search request params from the browser to the Instant search base page to fix … (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2214
Patch Set: Created 6 years, 1 month 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/renderer/searchbox/searchbox.h ('k') | chrome/renderer/searchbox/searchbox_extension.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/searchbox/searchbox.cc
diff --git a/chrome/renderer/searchbox/searchbox.cc b/chrome/renderer/searchbox/searchbox.cc
index 7c898c5b27432040bc9bf884b620ef93da1110e2..f639bfc9c5933efc96709349d321850188b13b92 100644
--- a/chrome/renderer/searchbox/searchbox.cc
+++ b/chrome/renderer/searchbox/searchbox.cc
@@ -237,6 +237,10 @@ const ThemeBackgroundInfo& SearchBox::GetThemeBackgroundInfo() {
return theme_info_;
}
+const EmbeddedSearchRequestParams& SearchBox::GetEmbeddedSearchRequestParams() {
+ return embedded_search_request_params_;
+}
+
void SearchBox::Focus() {
render_view()->Send(new ChromeViewHostMsg_FocusOmnibox(
render_view()->GetRoutingID(), page_seq_no_, OMNIBOX_FOCUS_VISIBLE));
@@ -426,8 +430,10 @@ void SearchBox::OnSetSuggestionToPrefetch(const InstantSuggestion& suggestion) {
}
}
-void SearchBox::OnSubmit(const base::string16& query) {
+void SearchBox::OnSubmit(const base::string16& query,
+ const EmbeddedSearchRequestParams& params) {
query_ = query;
+ embedded_search_request_params_ = params;
if (render_view()->GetWebView() && render_view()->GetWebView()->mainFrame()) {
DVLOG(1) << render_view() << " OnSubmit";
extensions_v8::SearchBoxExtension::DispatchSubmit(
@@ -463,6 +469,7 @@ GURL SearchBox::GetURLForMostVisitedItem(InstantRestrictedID item_id) const {
void SearchBox::Reset() {
query_.clear();
+ embedded_search_request_params_ = EmbeddedSearchRequestParams();
suggestion_ = InstantSuggestion();
start_margin_ = 0;
is_focused_ = false;
« no previous file with comments | « chrome/renderer/searchbox/searchbox.h ('k') | chrome/renderer/searchbox/searchbox_extension.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698