#ifndef UI_VIEWS_WIDGET_WIDGET_DELETION_OBSERVER_H_
#define UI_VIEWS_WIDGET_WIDGET_DELETION_OBSERVER_H_
#include "base/basictypes.h"
#include "base/compiler_specific.h"
#include "ui/views/views_export.h"
#include "ui/views/widget/widget_observer.h"
namespace views {
class Widget;
class VIEWS_EXPORT WidgetDeletionObserver : public WidgetObserver {
public:
explicit WidgetDeletionObserver(Widget* widget);
virtual ~WidgetDeletionObserver();
bool IsWidgetAlive() { return widget_ != NULL; }
virtual void OnWidgetDestroying(Widget* widget) OVERRIDE;
private:
void CleanupWidget();
Widget* widget_;
DISALLOW_COPY_AND_ASSIGN(WidgetDeletionObserver);
};
}
#endif