Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright (c) 2016 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CHROME_BROWSER_ANDROID_LOCALE_SPECIAL_LOCALE_HANDLER_H_ | |
| 6 #define CHROME_BROWSER_ANDROID_LOCALE_SPECIAL_LOCALE_HANDLER_H_ | |
| 7 | |
| 8 #include <jni.h> | |
| 9 | |
| 10 #include "base/android/scoped_java_ref.h" | |
| 11 #include "base/macros.h" | |
| 12 #include "components/search_engines/template_url.h" | |
| 13 | |
| 14 class TemplateURLService; | |
| 15 | |
| 16 class SpecialLocaleHandler { | |
| 17 public: | |
| 18 explicit SpecialLocaleHandler(std::string locale); | |
| 19 void Destroy(JNIEnv* env, const base::android::JavaParamRef<jobject>& obj); | |
| 20 jboolean LoadTemplateUrls(JNIEnv* env, | |
| 21 const base::android::JavaParamRef<jobject>& obj); | |
| 22 void RemoveTemplateUrls(JNIEnv* env, | |
| 23 const base::android::JavaParamRef<jobject>& obj); | |
| 24 | |
| 25 void OverrideDefaultSearchProvider( | |
| 26 JNIEnv* env, | |
| 27 const base::android::JavaParamRef<jobject>& obj); | |
| 28 | |
| 29 private: | |
| 30 virtual ~SpecialLocaleHandler(); | |
| 31 | |
| 32 std::string locale_; | |
|
Maria
2016/09/16 23:44:01
add include for string
Ian Wen
2016/09/19 17:37:55
Done.
| |
| 33 | |
| 34 // Tracks all local search engines that were added to TURL service. | |
| 35 std::vector<int> prepopulate_ids_; | |
|
Maria
2016/09/16 23:44:01
add include for vector
Ian Wen
2016/09/19 17:37:55
Done.
| |
| 36 | |
| 37 // Pointer to the TemplateUrlService for the main profile. | |
| 38 TemplateURLService* template_url_service_; | |
| 39 | |
| 40 DISALLOW_COPY_AND_ASSIGN(SpecialLocaleHandler); | |
| 41 }; | |
| 42 | |
| 43 bool RegisterSpecialLocaleHandler(JNIEnv* env); | |
| 44 | |
| 45 #endif // CHROME_BROWSER_ANDROID_LOCALE_SPECIAL_LOCALE_HANDLER_H_ | |
| OLD | NEW |