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

Side by Side Diff: chrome/browser/ui/search/search_tab_helper.cc

Issue 2884293002: Remove unused embeddedSearch.searchBox APIs (Closed)
Patch Set: . Created 3 years, 7 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 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 <memory> 7 #include <memory>
8 #include <set> 8 #include <set>
9 9
10 #include "base/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 return; 172 return;
173 173
174 UpdateMode(/*update_origin=*/false); 174 UpdateMode(/*update_origin=*/false);
175 } 175 }
176 176
177 void SearchTabHelper::SetSuggestionToPrefetch( 177 void SearchTabHelper::SetSuggestionToPrefetch(
178 const InstantSuggestion& suggestion) { 178 const InstantSuggestion& suggestion) {
179 ipc_router_.SetSuggestionToPrefetch(suggestion); 179 ipc_router_.SetSuggestionToPrefetch(suggestion);
180 } 180 }
181 181
182 void SearchTabHelper::Submit(const base::string16& text, 182 void SearchTabHelper::Submit(const EmbeddedSearchRequestParams& params) {
183 const EmbeddedSearchRequestParams& params) { 183 ipc_router_.Submit(params);
184 ipc_router_.Submit(text, params);
185 } 184 }
186 185
187 void SearchTabHelper::OnTabActivated() { 186 void SearchTabHelper::OnTabActivated() {
188 ipc_router_.OnTabActivated(); 187 ipc_router_.OnTabActivated();
189 188
190 if (search::IsInstantNTP(web_contents_)) { 189 if (search::IsInstantNTP(web_contents_)) {
191 if (instant_service_) 190 if (instant_service_)
192 instant_service_->OnNewTabPageOpened(); 191 instant_service_->OnNewTabPageOpened();
193 192
194 // Force creation of NTPUserDataLogger, if we loaded an NTP. The 193 // Force creation of NTPUserDataLogger, if we loaded an NTP. The
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after
500 return Profile::FromBrowserContext(web_contents_->GetBrowserContext()); 499 return Profile::FromBrowserContext(web_contents_->GetBrowserContext());
501 } 500 }
502 501
503 bool SearchTabHelper::IsInputInProgress() const { 502 bool SearchTabHelper::IsInputInProgress() const {
504 if (model_.mode().is_ntp()) 503 if (model_.mode().is_ntp())
505 return false; 504 return false;
506 const OmniboxView* omnibox_view = GetOmniboxView(); 505 const OmniboxView* omnibox_view = GetOmniboxView();
507 return omnibox_view && 506 return omnibox_view &&
508 omnibox_view->model()->focus_state() == OMNIBOX_FOCUS_VISIBLE; 507 omnibox_view->model()->focus_state() == OMNIBOX_FOCUS_VISIBLE;
509 } 508 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698