Chromium Code Reviews| Index: chrome/browser/search_engines/template_url_service_android.h |
| diff --git a/chrome/browser/search_engines/template_url_service_android.h b/chrome/browser/search_engines/template_url_service_android.h |
| index f2543b7a92ca9410de1febaa1cff6636dad9ac9b..b16c6a77133cdca90ef2bf1577890e643ec0f9a3 100644 |
| --- a/chrome/browser/search_engines/template_url_service_android.h |
| +++ b/chrome/browser/search_engines/template_url_service_android.h |
| @@ -7,8 +7,8 @@ |
| #include "base/android/jni_helper.h" |
| #include "base/android/scoped_java_ref.h" |
| -#include "content/public/browser/notification_observer.h" |
| -#include "content/public/browser/notification_registrar.h" |
| +#include "base/memory/scoped_ptr.h" |
| +#include "chrome/browser/search_engines/template_url_service.h" |
| class TemplateURL; |
| class TemplateURLService; |
|
Lei Zhang
2013/10/08 00:25:20
fwd-decl no longer needed
Cait (Slow)
2013/10/08 15:09:32
Done.
|
| @@ -17,7 +17,7 @@ class TemplateURLService; |
| // Android wrapper of the TemplateUrlService which provides access from the Java |
| // layer. Note that on Android, there's only a single profile, and therefore |
| // a single instance of this wrapper. |
| -class TemplateUrlServiceAndroid : public content::NotificationObserver { |
| +class TemplateUrlServiceAndroid { |
| public: |
| TemplateUrlServiceAndroid(JNIEnv* env, jobject obj); |
| @@ -41,11 +41,6 @@ class TemplateUrlServiceAndroid : public content::NotificationObserver { |
| jstring jquery, |
| jstring jcurrent_url); |
| - // NotificationObserver: |
| - virtual void Observe(int type, |
| - const content::NotificationSource& source, |
| - const content::NotificationDetails& details) OVERRIDE; |
| - |
| static bool Register(JNIEnv* env); |
| private: |
| @@ -53,12 +48,15 @@ class TemplateUrlServiceAndroid : public content::NotificationObserver { |
| bool IsPrepopulatedTemplate(TemplateURL* url); |
| + void OnTemplateURLServiceLoaded(); |
| + |
| JavaObjectWeakGlobalRef weak_java_obj_; |
| - content::NotificationRegistrar registrar_; |
| // Pointer to the TemplateUrlService for the main profile. |
| TemplateURLService* template_url_service_; |
| + scoped_ptr<TemplateURLService::Subscription> template_url_subscription_; |
| + |
| DISALLOW_COPY_AND_ASSIGN(TemplateUrlServiceAndroid); |
| }; |