OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 #ifndef CHROME_BROWSER_SEARCH_ENGINES_TEMPLATE_URL_SERVICE_ANDROID_H_ | 5 #ifndef CHROME_BROWSER_SEARCH_ENGINES_TEMPLATE_URL_SERVICE_ANDROID_H_ |
6 #define CHROME_BROWSER_SEARCH_ENGINES_TEMPLATE_URL_SERVICE_ANDROID_H_ | 6 #define CHROME_BROWSER_SEARCH_ENGINES_TEMPLATE_URL_SERVICE_ANDROID_H_ |
7 | 7 |
8 #include "base/android/jni_weak_ref.h" | 8 #include "base/android/jni_weak_ref.h" |
9 #include "base/android/scoped_java_ref.h" | 9 #include "base/android/scoped_java_ref.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 jstring jquery); | 42 jstring jquery); |
43 base::android::ScopedJavaLocalRef<jstring> ReplaceSearchTermsInUrl( | 43 base::android::ScopedJavaLocalRef<jstring> ReplaceSearchTermsInUrl( |
44 JNIEnv* env, | 44 JNIEnv* env, |
45 jobject obj, | 45 jobject obj, |
46 jstring jquery, | 46 jstring jquery, |
47 jstring jcurrent_url); | 47 jstring jcurrent_url); |
48 base::android::ScopedJavaLocalRef<jstring> GetUrlForContextualSearchQuery( | 48 base::android::ScopedJavaLocalRef<jstring> GetUrlForContextualSearchQuery( |
49 JNIEnv* env, | 49 JNIEnv* env, |
50 jobject obj, | 50 jobject obj, |
51 jstring jquery, | 51 jstring jquery, |
52 jstring jalternate_term); | 52 jstring jalternate_term, |
| 53 jboolean jshould_prefetch); |
53 | 54 |
54 static bool Register(JNIEnv* env); | 55 static bool Register(JNIEnv* env); |
55 | 56 |
56 private: | 57 private: |
57 ~TemplateUrlServiceAndroid(); | 58 ~TemplateUrlServiceAndroid(); |
58 | 59 |
59 bool IsPrepopulatedTemplate(TemplateURL* url); | 60 bool IsPrepopulatedTemplate(TemplateURL* url); |
60 | 61 |
61 void OnTemplateURLServiceLoaded(); | 62 void OnTemplateURLServiceLoaded(); |
62 | 63 |
63 JavaObjectWeakGlobalRef weak_java_obj_; | 64 JavaObjectWeakGlobalRef weak_java_obj_; |
64 | 65 |
65 // Pointer to the TemplateUrlService for the main profile. | 66 // Pointer to the TemplateUrlService for the main profile. |
66 TemplateURLService* template_url_service_; | 67 TemplateURLService* template_url_service_; |
67 | 68 |
68 scoped_ptr<TemplateURLService::Subscription> template_url_subscription_; | 69 scoped_ptr<TemplateURLService::Subscription> template_url_subscription_; |
69 | 70 |
70 DISALLOW_COPY_AND_ASSIGN(TemplateUrlServiceAndroid); | 71 DISALLOW_COPY_AND_ASSIGN(TemplateUrlServiceAndroid); |
71 }; | 72 }; |
72 | 73 |
73 #endif // CHROME_BROWSER_SEARCH_ENGINES_TEMPLATE_URL_SERVICE_ANDROID_H_ | 74 #endif // CHROME_BROWSER_SEARCH_ENGINES_TEMPLATE_URL_SERVICE_ANDROID_H_ |
OLD | NEW |