diff options
author | dtrainor@chromium.org <dtrainor@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-09-03 15:19:08 +0000 |
---|---|---|
committer | dtrainor@chromium.org <dtrainor@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-09-03 15:19:08 +0000 |
commit | 3da17d729e6e0e448bc99f387948e61a182a3426 (patch) | |
tree | 3ae06bce7ebd3d1867413c0c1f267344ded7199e /chrome/browser/android/tab_android.h | |
parent | 673fb51177af6ef6f5e88acd872e85b6d0ed7d7a (diff) | |
download | chromium_src-3da17d729e6e0e448bc99f387948e61a182a3426.zip chromium_src-3da17d729e6e0e448bc99f387948e61a182a3426.tar.gz chromium_src-3da17d729e6e0e448bc99f387948e61a182a3426.tar.bz2 |
Add notification observer support to TabAndroid
- Add favicon changed notifications
- Add popup blocked notifications
BUG=277135
NOTRY=true
Review URL: https://chromiumcodereview.appspot.com/23694006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@220945 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/android/tab_android.h')
-rw-r--r-- | chrome/browser/android/tab_android.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/chrome/browser/android/tab_android.h b/chrome/browser/android/tab_android.h index 81ef955..8088410 100644 --- a/chrome/browser/android/tab_android.h +++ b/chrome/browser/android/tab_android.h @@ -14,6 +14,8 @@ #include "chrome/browser/sessions/session_id.h" #include "chrome/browser/ui/tab_contents/core_tab_helper_delegate.h" #include "chrome/browser/ui/toolbar/toolbar_model.h" +#include "content/public/browser/notification_observer.h" +#include "content/public/browser/notification_registrar.h" class GURL; class Profile; @@ -39,7 +41,8 @@ struct ContextMenuParams; class WebContents; } -class TabAndroid : public CoreTabHelperDelegate { +class TabAndroid : public CoreTabHelperDelegate, + public content::NotificationObserver { public: // Convenience method to retrieve the Tab associated with the passed // WebContents. Can return NULL. @@ -123,6 +126,11 @@ class TabAndroid : public CoreTabHelperDelegate { virtual void SwapTabContents(content::WebContents* old_contents, content::WebContents* new_contents) OVERRIDE; + // NotificationObserver ----------------------------------------------------- + virtual void Observe(int type, + const content::NotificationSource& source, + const content::NotificationDetails& details) OVERRIDE; + // Methods called from Java via JNI ----------------------------------------- virtual void InitWebContents(JNIEnv* env, @@ -136,6 +144,7 @@ class TabAndroid : public CoreTabHelperDelegate { jboolean delete_native); base::android::ScopedJavaLocalRef<jobject> GetProfileAndroid(JNIEnv* env, jobject obj); + void LaunchBlockedPopups(JNIEnv* env, jobject obj); protected: virtual ~TabAndroid(); @@ -146,6 +155,8 @@ class TabAndroid : public CoreTabHelperDelegate { SessionID session_tab_id_; int android_tab_id_; + content::NotificationRegistrar notification_registrar_; + scoped_ptr<content::WebContents> web_contents_; scoped_ptr<chrome::android::ChromeWebContentsDelegateAndroid> web_contents_delegate_; |