| 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/android/omnibox/omnibox_prerender.h" | 5 #include "chrome/browser/android/omnibox/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/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/profiles/profile_android.h" | 13 #include "chrome/browser/profiles/profile_android.h" |
| 14 #include "chrome/browser/ui/search/instant_search_prerenderer.h" | 14 #include "chrome/browser/ui/search/instant_search_prerenderer.h" |
| 15 #include "components/omnibox/browser/autocomplete_match.h" | 15 #include "components/omnibox/browser/autocomplete_match.h" |
| 16 #include "components/omnibox/browser/autocomplete_result.h" | 16 #include "components/omnibox/browser/autocomplete_result.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 base::android::JavaParamRef; |
| 21 using predictors::AutocompleteActionPredictor; | 22 using predictors::AutocompleteActionPredictor; |
| 22 using predictors::AutocompleteActionPredictorFactory; | 23 using predictors::AutocompleteActionPredictorFactory; |
| 23 | 24 |
| 24 OmniboxPrerender::OmniboxPrerender(JNIEnv* env, jobject obj) | 25 OmniboxPrerender::OmniboxPrerender(JNIEnv* env, jobject obj) |
| 25 : weak_java_omnibox_(env, obj) { | 26 : weak_java_omnibox_(env, obj) { |
| 26 } | 27 } |
| 27 | 28 |
| 28 OmniboxPrerender::~OmniboxPrerender() { | 29 OmniboxPrerender::~OmniboxPrerender() { |
| 29 } | 30 } |
| 30 | 31 |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 151 web_contents->GetController().GetDefaultSessionStorageNamespace(), | 152 web_contents->GetController().GetDefaultSessionStorageNamespace(), |
| 152 container_bounds.size()); | 153 container_bounds.size()); |
| 153 return; | 154 return; |
| 154 } | 155 } |
| 155 predictors::AutocompleteActionPredictorFactory::GetForProfile(profile)-> | 156 predictors::AutocompleteActionPredictorFactory::GetForProfile(profile)-> |
| 156 StartPrerendering( | 157 StartPrerendering( |
| 157 match.destination_url, | 158 match.destination_url, |
| 158 web_contents->GetController().GetDefaultSessionStorageNamespace(), | 159 web_contents->GetController().GetDefaultSessionStorageNamespace(), |
| 159 container_bounds.size()); | 160 container_bounds.size()); |
| 160 } | 161 } |
| OLD | NEW |