| OLD | NEW |
| 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/omnibox/omnibox_current_page_delegate_impl.h" | 5 #include "chrome/browser/ui/omnibox/omnibox_current_page_delegate_impl.h" |
| 6 | 6 |
| 7 #include "base/strings/utf_string_conversions.h" | 7 #include "base/strings/utf_string_conversions.h" |
| 8 #include "chrome/browser/autocomplete/autocomplete_match.h" | 8 #include "chrome/browser/autocomplete/autocomplete_match.h" |
| 9 #include "chrome/browser/extensions/api/omnibox/omnibox_api.h" | 9 #include "chrome/browser/extensions/api/omnibox/omnibox_api.h" |
| 10 #include "chrome/browser/predictors/autocomplete_action_predictor.h" | 10 #include "chrome/browser/predictors/autocomplete_action_predictor.h" |
| 11 #include "chrome/browser/predictors/autocomplete_action_predictor_factory.h" | 11 #include "chrome/browser/predictors/autocomplete_action_predictor_factory.h" |
| 12 #include "chrome/browser/profiles/profile.h" | 12 #include "chrome/browser/profiles/profile.h" |
| 13 #include "chrome/browser/search/search.h" | 13 #include "chrome/browser/search/search.h" |
| 14 #include "chrome/browser/search_engines/template_url_service.h" |
| 14 #include "chrome/browser/search_engines/template_url_service_factory.h" | 15 #include "chrome/browser/search_engines/template_url_service_factory.h" |
| 15 #include "chrome/browser/sessions/session_tab_helper.h" | 16 #include "chrome/browser/sessions/session_tab_helper.h" |
| 16 #include "chrome/browser/ui/omnibox/omnibox_edit_controller.h" | 17 #include "chrome/browser/ui/omnibox/omnibox_edit_controller.h" |
| 17 #include "chrome/browser/ui/search/instant_search_prerenderer.h" | 18 #include "chrome/browser/ui/search/instant_search_prerenderer.h" |
| 18 #include "chrome/browser/ui/search/search_tab_helper.h" | 19 #include "chrome/browser/ui/search/search_tab_helper.h" |
| 19 #include "components/search_engines/template_url_service.h" | |
| 20 #include "content/public/browser/navigation_controller.h" | 20 #include "content/public/browser/navigation_controller.h" |
| 21 #include "content/public/browser/web_contents.h" | 21 #include "content/public/browser/web_contents.h" |
| 22 #include "ui/base/window_open_disposition.h" | 22 #include "ui/base/window_open_disposition.h" |
| 23 #include "url/gurl.h" | 23 #include "url/gurl.h" |
| 24 | 24 |
| 25 OmniboxCurrentPageDelegateImpl::OmniboxCurrentPageDelegateImpl( | 25 OmniboxCurrentPageDelegateImpl::OmniboxCurrentPageDelegateImpl( |
| 26 OmniboxEditController* controller, | 26 OmniboxEditController* controller, |
| 27 Profile* profile) | 27 Profile* profile) |
| 28 : controller_(controller), | 28 : controller_(controller), |
| 29 profile_(profile) {} | 29 profile_(profile) {} |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 SearchTabHelper::FromWebContents(web_contents)-> | 128 SearchTabHelper::FromWebContents(web_contents)-> |
| 129 SetSuggestionToPrefetch(suggestion); | 129 SetSuggestionToPrefetch(suggestion); |
| 130 } | 130 } |
| 131 } else if (chrome::ShouldPrefetchSearchResults()) { | 131 } else if (chrome::ShouldPrefetchSearchResults()) { |
| 132 InstantSearchPrerenderer* prerenderer = | 132 InstantSearchPrerenderer* prerenderer = |
| 133 InstantSearchPrerenderer::GetForProfile(profile_); | 133 InstantSearchPrerenderer::GetForProfile(profile_); |
| 134 if (prerenderer) | 134 if (prerenderer) |
| 135 prerenderer->Prerender(suggestion); | 135 prerenderer->Prerender(suggestion); |
| 136 } | 136 } |
| 137 } | 137 } |
| OLD | NEW |