Chromium Code Reviews| Index: chrome/browser/android/locale/special_locale_handler.h |
| diff --git a/chrome/browser/android/locale/special_locale_handler.h b/chrome/browser/android/locale/special_locale_handler.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..eaf4e5d7d32e25021e53dc6c2ad1396ffc4b6b52 |
| --- /dev/null |
| +++ b/chrome/browser/android/locale/special_locale_handler.h |
| @@ -0,0 +1,45 @@ |
| +// Copyright (c) 2016 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CHROME_BROWSER_ANDROID_LOCALE_SPECIAL_LOCALE_HANDLER_H_ |
| +#define CHROME_BROWSER_ANDROID_LOCALE_SPECIAL_LOCALE_HANDLER_H_ |
| + |
| +#include <jni.h> |
| + |
| +#include "base/android/scoped_java_ref.h" |
| +#include "base/macros.h" |
| +#include "components/search_engines/template_url.h" |
| + |
| +class TemplateURLService; |
| + |
| +class SpecialLocaleHandler { |
| + public: |
| + explicit SpecialLocaleHandler(std::string locale); |
| + void Destroy(JNIEnv* env, const base::android::JavaParamRef<jobject>& obj); |
| + jboolean LoadTemplateUrls(JNIEnv* env, |
| + const base::android::JavaParamRef<jobject>& obj); |
| + void RemoveTemplateUrls(JNIEnv* env, |
| + const base::android::JavaParamRef<jobject>& obj); |
| + |
| + void OverrideDefaultSearchProvider( |
| + JNIEnv* env, |
| + const base::android::JavaParamRef<jobject>& obj); |
| + |
| + private: |
| + virtual ~SpecialLocaleHandler(); |
| + |
| + std::string locale_; |
|
Maria
2016/09/16 23:44:01
add include for string
Ian Wen
2016/09/19 17:37:55
Done.
|
| + |
| + // Tracks all local search engines that were added to TURL service. |
| + 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.
|
| + |
| + // Pointer to the TemplateUrlService for the main profile. |
| + TemplateURLService* template_url_service_; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(SpecialLocaleHandler); |
| +}; |
| + |
| +bool RegisterSpecialLocaleHandler(JNIEnv* env); |
| + |
| +#endif // CHROME_BROWSER_ANDROID_LOCALE_SPECIAL_LOCALE_HANDLER_H_ |