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