| 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..761e2460748719c7fd1149b97454686f27d6aae6 100644
|
| --- a/chrome/browser/search_engines/template_url_service_android.h
|
| +++ b/chrome/browser/search_engines/template_url_service_android.h
|
| @@ -7,17 +7,16 @@
|
|
|
| #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;
|
|
|
|
|
| // 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,24 +40,22 @@ 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:
|
| - virtual ~TemplateUrlServiceAndroid();
|
| + ~TemplateUrlServiceAndroid();
|
|
|
| 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);
|
| };
|
|
|
|
|