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

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

Issue 1381633002: Cleanup: IWYU for browser_navigator.h and browser_navigator_params.h. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase, fix merge conflict Created 5 years, 2 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/instant_search_prerenderer.h" 5 #include "chrome/browser/ui/search/instant_search_prerenderer.h"
6 6
7 #include "chrome/browser/prerender/prerender_handle.h" 7 #include "chrome/browser/prerender/prerender_handle.h"
8 #include "chrome/browser/prerender/prerender_manager.h" 8 #include "chrome/browser/prerender/prerender_manager.h"
9 #include "chrome/browser/prerender/prerender_manager_factory.h" 9 #include "chrome/browser/prerender/prerender_manager_factory.h"
10 #include "chrome/browser/profiles/profile.h" 10 #include "chrome/browser/profiles/profile.h"
11 #include "chrome/browser/search/instant_service.h" 11 #include "chrome/browser/search/instant_service.h"
12 #include "chrome/browser/search/instant_service_factory.h" 12 #include "chrome/browser/search/instant_service_factory.h"
13 #include "chrome/browser/search/search.h" 13 #include "chrome/browser/search/search.h"
14 #include "chrome/browser/search_engines/template_url_service_factory.h" 14 #include "chrome/browser/search_engines/template_url_service_factory.h"
15 #include "chrome/browser/ui/browser_navigator.h" 15 #include "chrome/browser/ui/browser_navigator_params.h"
16 #include "chrome/browser/ui/search/search_tab_helper.h" 16 #include "chrome/browser/ui/search/search_tab_helper.h"
17 #include "components/omnibox/browser/autocomplete_match.h" 17 #include "components/omnibox/browser/autocomplete_match.h"
18 #include "components/search/search.h" 18 #include "components/search/search.h"
19 #include "components/search_engines/template_url_service.h" 19 #include "components/search_engines/template_url_service.h"
20 20
21 namespace { 21 namespace {
22 22
23 // Returns true if the underlying page supports Instant search. 23 // Returns true if the underlying page supports Instant search.
24 bool PageSupportsInstantSearch(content::WebContents* contents) { 24 bool PageSupportsInstantSearch(content::WebContents* contents) {
25 // Search results page supports Instant search. 25 // Search results page supports Instant search.
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 return (prerender_handle_ && prerender_handle_->contents()) ? 189 return (prerender_handle_ && prerender_handle_->contents()) ?
190 prerender_handle_->contents()->prerender_contents() : NULL; 190 prerender_handle_->contents()->prerender_contents() : NULL;
191 } 191 }
192 192
193 bool InstantSearchPrerenderer::QueryMatchesPrefetch( 193 bool InstantSearchPrerenderer::QueryMatchesPrefetch(
194 const base::string16& query) const { 194 const base::string16& query) const {
195 if (search::ShouldReuseInstantSearchBasePage()) 195 if (search::ShouldReuseInstantSearchBasePage())
196 return true; 196 return true;
197 return last_instant_suggestion_.text == query; 197 return last_instant_suggestion_.text == query;
198 } 198 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/passwords/manage_passwords_ui_controller.cc ('k') | chrome/browser/ui/search/search_tab_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698