summaryrefslogtreecommitdiffstats
path: root/chrome/browser/automation/automation_provider_observers.h
diff options
context:
space:
mode:
authornirnimesh@chromium.org <nirnimesh@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-21 06:49:52 +0000
committernirnimesh@chromium.org <nirnimesh@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-21 06:49:52 +0000
commit38b5a3857b47607dc496c92f35cb49a71271f0e9 (patch)
tree308edaf5baa1f1c7d88882ba034a6c596134b13a /chrome/browser/automation/automation_provider_observers.h
parentaefe49140801128e760dcd99cdbc81a169a3d227 (diff)
downloadchromium_src-38b5a3857b47607dc496c92f35cb49a71271f0e9.zip
chromium_src-38b5a3857b47607dc496c92f35cb49a71271f0e9.tar.gz
chromium_src-38b5a3857b47607dc496c92f35cb49a71271f0e9.tar.bz2
Fetch info about infobars
This includes user-visible info about the following types of infobars: - ConfirmInfoBarDelegate (includes ThemeInstalledInfoBarDelegate & CrashedExtensionInfoBarDelegate) - AlertInfoBarDelegate - LinkInfoBarDelegate - TranslateInfoBarDelegate Adds a test to verify crash infobar when a (flash) plugin dies. Review URL: http://codereview.chromium.org/2305001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53161 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/automation/automation_provider_observers.h')
-rw-r--r--chrome/browser/automation/automation_provider_observers.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/chrome/browser/automation/automation_provider_observers.h b/chrome/browser/automation/automation_provider_observers.h
index 08d9e08..732d1fd 100644
--- a/chrome/browser/automation/automation_provider_observers.h
+++ b/chrome/browser/automation/automation_provider_observers.h
@@ -16,6 +16,7 @@
#include "chrome/browser/importer/importer.h"
#include "chrome/browser/importer/importer_data_types.h"
#include "chrome/browser/password_manager/password_store.h"
+#include "chrome/browser/tab_contents/tab_contents.h"
#include "chrome/common/notification_observer.h"
#include "chrome/common/notification_registrar.h"
#include "chrome/common/notification_type.h"
@@ -710,4 +711,28 @@ class SavePackageNotificationObserver : public NotificationObserver {
DISALLOW_COPY_AND_ASSIGN(SavePackageNotificationObserver);
};
+// Allows the automation provider to wait for a given number of infobars.
+class WaitForInfobarCountObserver : public NotificationObserver {
+ public:
+ WaitForInfobarCountObserver(AutomationProvider* automation,
+ IPC::Message* reply_message,
+ TabContents* tab_contents,
+ int count);
+
+ virtual void Observe(NotificationType type,
+ const NotificationSource& source,
+ const NotificationDetails& details);
+
+ private:
+ void ConditionMet();
+
+ NotificationRegistrar registrar_;
+ AutomationProvider* automation_;
+ IPC::Message* reply_message_;
+ TabContents* tab_contents_;
+ int count_;
+
+ DISALLOW_COPY_AND_ASSIGN(WaitForInfobarCountObserver);
+};
+
#endif // CHROME_BROWSER_AUTOMATION_AUTOMATION_PROVIDER_OBSERVERS_H_