| 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_helper.h" | 8 #include "base/android/jni_helper.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 16 matching lines...) Expand all Loading... |
| 27 jboolean IsLoaded(JNIEnv* env, jobject obj); | 27 jboolean IsLoaded(JNIEnv* env, jobject obj); |
| 28 base::android::ScopedJavaLocalRef<jobject> | 28 base::android::ScopedJavaLocalRef<jobject> |
| 29 GetPrepopulatedTemplateUrlAt(JNIEnv* env, jobject obj, jint index); | 29 GetPrepopulatedTemplateUrlAt(JNIEnv* env, jobject obj, jint index); |
| 30 jboolean IsSearchProviderManaged(JNIEnv* env, jobject obj); | 30 jboolean IsSearchProviderManaged(JNIEnv* env, jobject obj); |
| 31 jboolean IsSearchByImageAvailable(JNIEnv* env, jobject obj); | 31 jboolean IsSearchByImageAvailable(JNIEnv* env, jobject obj); |
| 32 jboolean IsDefaultSearchEngineGoogle(JNIEnv* env, jobject obj); | 32 jboolean IsDefaultSearchEngineGoogle(JNIEnv* env, jobject obj); |
| 33 base::android::ScopedJavaLocalRef<jstring> GetUrlForSearchQuery( | 33 base::android::ScopedJavaLocalRef<jstring> GetUrlForSearchQuery( |
| 34 JNIEnv* env, | 34 JNIEnv* env, |
| 35 jobject obj, | 35 jobject obj, |
| 36 jstring jquery); | 36 jstring jquery); |
| 37 base::android::ScopedJavaLocalRef<jstring> GetUrlForVoiceSearchQuery( |
| 38 JNIEnv* env, |
| 39 jobject obj, |
| 40 jstring jquery); |
| 37 base::android::ScopedJavaLocalRef<jstring> ReplaceSearchTermsInUrl( | 41 base::android::ScopedJavaLocalRef<jstring> ReplaceSearchTermsInUrl( |
| 38 JNIEnv* env, | 42 JNIEnv* env, |
| 39 jobject obj, | 43 jobject obj, |
| 40 jstring jquery, | 44 jstring jquery, |
| 41 jstring jcurrent_url); | 45 jstring jcurrent_url); |
| 42 | 46 |
| 43 static bool Register(JNIEnv* env); | 47 static bool Register(JNIEnv* env); |
| 44 | 48 |
| 45 private: | 49 private: |
| 46 ~TemplateUrlServiceAndroid(); | 50 ~TemplateUrlServiceAndroid(); |
| 47 | 51 |
| 48 bool IsPrepopulatedTemplate(TemplateURL* url); | 52 bool IsPrepopulatedTemplate(TemplateURL* url); |
| 49 | 53 |
| 50 void OnTemplateURLServiceLoaded(); | 54 void OnTemplateURLServiceLoaded(); |
| 51 | 55 |
| 52 JavaObjectWeakGlobalRef weak_java_obj_; | 56 JavaObjectWeakGlobalRef weak_java_obj_; |
| 53 | 57 |
| 54 // Pointer to the TemplateUrlService for the main profile. | 58 // Pointer to the TemplateUrlService for the main profile. |
| 55 TemplateURLService* template_url_service_; | 59 TemplateURLService* template_url_service_; |
| 56 | 60 |
| 57 scoped_ptr<TemplateURLService::Subscription> template_url_subscription_; | 61 scoped_ptr<TemplateURLService::Subscription> template_url_subscription_; |
| 58 | 62 |
| 59 DISALLOW_COPY_AND_ASSIGN(TemplateUrlServiceAndroid); | 63 DISALLOW_COPY_AND_ASSIGN(TemplateUrlServiceAndroid); |
| 60 }; | 64 }; |
| 61 | 65 |
| 62 #endif // CHROME_BROWSER_SEARCH_ENGINES_TEMPLATE_URL_SERVICE_ANDROID_H_ | 66 #endif // CHROME_BROWSER_SEARCH_ENGINES_TEMPLATE_URL_SERVICE_ANDROID_H_ |
| OLD | NEW |