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 27 matching lines...) Expand all Loading... |
38 jstring jquery); | 38 jstring jquery); |
39 base::android::ScopedJavaLocalRef<jstring> GetUrlForVoiceSearchQuery( | 39 base::android::ScopedJavaLocalRef<jstring> GetUrlForVoiceSearchQuery( |
40 JNIEnv* env, | 40 JNIEnv* env, |
41 jobject obj, | 41 jobject obj, |
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( |
| 49 JNIEnv* env, |
| 50 jobject obj, |
| 51 jstring jquery); |
48 | 52 |
49 static bool Register(JNIEnv* env); | 53 static bool Register(JNIEnv* env); |
50 | 54 |
51 private: | 55 private: |
52 ~TemplateUrlServiceAndroid(); | 56 ~TemplateUrlServiceAndroid(); |
53 | 57 |
54 bool IsPrepopulatedTemplate(TemplateURL* url); | 58 bool IsPrepopulatedTemplate(TemplateURL* url); |
55 | 59 |
56 void OnTemplateURLServiceLoaded(); | 60 void OnTemplateURLServiceLoaded(); |
57 | 61 |
58 JavaObjectWeakGlobalRef weak_java_obj_; | 62 JavaObjectWeakGlobalRef weak_java_obj_; |
59 | 63 |
60 // Pointer to the TemplateUrlService for the main profile. | 64 // Pointer to the TemplateUrlService for the main profile. |
61 TemplateURLService* template_url_service_; | 65 TemplateURLService* template_url_service_; |
62 | 66 |
63 scoped_ptr<TemplateURLService::Subscription> template_url_subscription_; | 67 scoped_ptr<TemplateURLService::Subscription> template_url_subscription_; |
64 | 68 |
65 DISALLOW_COPY_AND_ASSIGN(TemplateUrlServiceAndroid); | 69 DISALLOW_COPY_AND_ASSIGN(TemplateUrlServiceAndroid); |
66 }; | 70 }; |
67 | 71 |
68 #endif // CHROME_BROWSER_SEARCH_ENGINES_TEMPLATE_URL_SERVICE_ANDROID_H_ | 72 #endif // CHROME_BROWSER_SEARCH_ENGINES_TEMPLATE_URL_SERVICE_ANDROID_H_ |
OLD | NEW |