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

Side by Side Diff: chrome/browser/ui/search/search_tab_helper.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 unified diff | Download patch
« no previous file with comments | « chrome/browser/ui/search/search_tab_helper.h ('k') | chrome/chrome_tests_unit.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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/search/search_tab_helper.h" 5 #include "chrome/browser/ui/search/search_tab_helper.h"
6 6
7 #include <set> 7 #include <set>
8 8
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 248
249 bool SearchTabHelper::SupportsInstant() const { 249 bool SearchTabHelper::SupportsInstant() const {
250 return model_.instant_support() == INSTANT_SUPPORT_YES; 250 return model_.instant_support() == INSTANT_SUPPORT_YES;
251 } 251 }
252 252
253 void SearchTabHelper::SetSuggestionToPrefetch( 253 void SearchTabHelper::SetSuggestionToPrefetch(
254 const InstantSuggestion& suggestion) { 254 const InstantSuggestion& suggestion) {
255 ipc_router_.SetSuggestionToPrefetch(suggestion); 255 ipc_router_.SetSuggestionToPrefetch(suggestion);
256 } 256 }
257 257
258 void SearchTabHelper::Submit(const base::string16& text) { 258 void SearchTabHelper::Submit(const base::string16& text,
259 ipc_router_.Submit(text); 259 const EmbeddedSearchRequestParams& params) {
260 ipc_router_.Submit(text, params);
260 } 261 }
261 262
262 void SearchTabHelper::OnTabActivated() { 263 void SearchTabHelper::OnTabActivated() {
263 ipc_router_.OnTabActivated(); 264 ipc_router_.OnTabActivated();
264 265
265 OmniboxView* omnibox_view = GetOmniboxView(); 266 OmniboxView* omnibox_view = GetOmniboxView();
266 if (chrome::ShouldPrerenderInstantUrlOnOmniboxFocus() && 267 if (chrome::ShouldPrerenderInstantUrlOnOmniboxFocus() &&
267 omnibox_has_focus_fn_(omnibox_view)) { 268 omnibox_has_focus_fn_(omnibox_view)) {
268 InstantSearchPrerenderer* prerenderer = 269 InstantSearchPrerenderer* prerenderer =
269 InstantSearchPrerenderer::GetForProfile(profile()); 270 InstantSearchPrerenderer::GetForProfile(profile());
(...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after
628 629
629 bool SearchTabHelper::IsInputInProgress() const { 630 bool SearchTabHelper::IsInputInProgress() const {
630 OmniboxView* omnibox = GetOmniboxView(); 631 OmniboxView* omnibox = GetOmniboxView();
631 return !model_.mode().is_ntp() && omnibox && 632 return !model_.mode().is_ntp() && omnibox &&
632 omnibox->model()->focus_state() == OMNIBOX_FOCUS_VISIBLE; 633 omnibox->model()->focus_state() == OMNIBOX_FOCUS_VISIBLE;
633 } 634 }
634 635
635 OmniboxView* SearchTabHelper::GetOmniboxView() const { 636 OmniboxView* SearchTabHelper::GetOmniboxView() const {
636 return delegate_ ? delegate_->GetOmniboxView() : NULL; 637 return delegate_ ? delegate_->GetOmniboxView() : NULL;
637 } 638 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/search/search_tab_helper.h ('k') | chrome/chrome_tests_unit.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698