| 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 "omnibox_prerender.h" | 5 #include "omnibox_prerender.h" |
| 6 | 6 |
| 7 #include "base/android/jni_string.h" | 7 #include "base/android/jni_string.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "chrome/browser/android/tab_android.h" | 9 #include "chrome/browser/android/tab_android.h" |
| 10 #include "chrome/browser/autocomplete/autocomplete_result.h" | 10 #include "chrome/browser/autocomplete/autocomplete_result.h" |
| 11 #include "chrome/browser/predictors/autocomplete_action_predictor.h" | 11 #include "chrome/browser/predictors/autocomplete_action_predictor.h" |
| 12 #include "chrome/browser/predictors/autocomplete_action_predictor_factory.h" | 12 #include "chrome/browser/predictors/autocomplete_action_predictor_factory.h" |
| 13 #include "chrome/browser/profiles/profile.h" | 13 #include "chrome/browser/profiles/profile.h" |
| 14 #include "chrome/browser/profiles/profile_android.h" | 14 #include "chrome/browser/profiles/profile_android.h" |
| 15 #include "chrome/browser/ui/search/instant_search_prerenderer.h" | 15 #include "chrome/browser/ui/search/instant_search_prerenderer.h" |
| 16 #include "components/autocomplete/autocomplete_match.h" | 16 #include "components/omnibox/autocomplete_match.h" |
| 17 #include "content/public/browser/web_contents.h" | 17 #include "content/public/browser/web_contents.h" |
| 18 #include "jni/OmniboxPrerender_jni.h" | 18 #include "jni/OmniboxPrerender_jni.h" |
| 19 #include "url/gurl.h" | 19 #include "url/gurl.h" |
| 20 | 20 |
| 21 using predictors::AutocompleteActionPredictor; | 21 using predictors::AutocompleteActionPredictor; |
| 22 using predictors::AutocompleteActionPredictorFactory; | 22 using predictors::AutocompleteActionPredictorFactory; |
| 23 | 23 |
| 24 OmniboxPrerender::OmniboxPrerender(JNIEnv* env, jobject obj) | 24 OmniboxPrerender::OmniboxPrerender(JNIEnv* env, jobject obj) |
| 25 : weak_java_omnibox_(env, obj) { | 25 : weak_java_omnibox_(env, obj) { |
| 26 } | 26 } |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 150 web_contents->GetController().GetSessionStorageNamespaceMap(), | 150 web_contents->GetController().GetSessionStorageNamespaceMap(), |
| 151 container_bounds.size()); | 151 container_bounds.size()); |
| 152 return; | 152 return; |
| 153 } | 153 } |
| 154 predictors::AutocompleteActionPredictorFactory::GetForProfile(profile)-> | 154 predictors::AutocompleteActionPredictorFactory::GetForProfile(profile)-> |
| 155 StartPrerendering( | 155 StartPrerendering( |
| 156 match.destination_url, | 156 match.destination_url, |
| 157 web_contents->GetController().GetSessionStorageNamespaceMap(), | 157 web_contents->GetController().GetSessionStorageNamespaceMap(), |
| 158 container_bounds.size()); | 158 container_bounds.size()); |
| 159 } | 159 } |
| OLD | NEW |