#ifndef CHROME_BROWSER_UI_PANELS_TEST_PANEL_NOTIFICATION_OBSERVER_H_
#define CHROME_BROWSER_UI_PANELS_TEST_PANEL_NOTIFICATION_OBSERVER_H_
#include "base/memory/ref_counted.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
namespace content {
class MessageLoopRunner;
class NotificaitonSource;
}
class TestPanelNotificationObserver : public content::NotificationObserver {
public:
TestPanelNotificationObserver(int notification,
const content::NotificationSource& source);
virtual ~TestPanelNotificationObserver();
void Wait();
virtual void Observe(int type,
const content::NotificationSource& source,
const content::NotificationDetails& details) OVERRIDE;
protected:
virtual bool AtExpectedState() = 0;
bool seen_;
bool running_;
content::NotificationRegistrar registrar_;
scoped_refptr<content::MessageLoopRunner> message_loop_runner_;
DISALLOW_COPY_AND_ASSIGN(TestPanelNotificationObserver);
};
#endif