Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2438)

Unified Diff: chrome/browser/automation/automation_provider_observers.h

Issue 2280003: Use IPC to wait for download in DownloadTest. (Closed) Base URL: git://codf21.jail.google.com/chromium.git
Patch Set: Fix compile error. Created 10 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/automation/automation_provider_observers.h
diff --git a/chrome/browser/automation/automation_provider_observers.h b/chrome/browser/automation/automation_provider_observers.h
index 6481005412f376f41c54b79da178ff76b419d493..97ca1abd120cbe1bb1da9938da85e792a0cd54c5 100644
--- a/chrome/browser/automation/automation_provider_observers.h
+++ b/chrome/browser/automation/automation_provider_observers.h
@@ -488,6 +488,29 @@ class LoginManagerObserver : public NotificationObserver {
};
#endif
+// Waits for the download shelf to appear or disappear
+// (depending on |visibility|).
+class DownloadShelfVisibilityObserver : public NotificationObserver {
+ public:
+ DownloadShelfVisibilityObserver(AutomationProvider* automation,
+ Browser* browser,
+ bool visiblity,
+ IPC::Message* reply_message);
+ ~DownloadShelfVisibilityObserver();
+
+ // NotificationObserver interface.
+ virtual void Observe(NotificationType type, const NotificationSource& source,
+ const NotificationDetails& details);
+
+ private:
+ NotificationRegistrar registrar_;
+ AutomationProvider* automation_;
+ bool visibility_;
+ IPC::Message* reply_message_;
+
+ DISALLOW_COPY_AND_ASSIGN(DownloadShelfVisibilityObserver);
+};
+
// Waits for the bookmark model to load.
class AutomationProviderBookmarkModelObserver : BookmarkModelObserver {
public:
@@ -536,8 +559,8 @@ class AutomationProviderBookmarkModelObserver : BookmarkModelObserver {
// When asked for pending downloads, the DownloadManager places
// results in a DownloadManager::Observer.
-class AutomationProviderDownloadManagerObserver :
- public DownloadManager::Observer {
+class AutomationProviderDownloadManagerObserver
+ : public DownloadManager::Observer {
public:
AutomationProviderDownloadManagerObserver() : DownloadManager::Observer() {}
virtual ~AutomationProviderDownloadManagerObserver() {}
« no previous file with comments | « chrome/browser/automation/automation_provider.cc ('k') | chrome/browser/automation/automation_provider_observers.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698