#ifndef ScreenOrientationDispatcher_h
#define ScreenOrientationDispatcher_h
#include "public/platform/WebScreenOrientationListener.h"
#include "wtf/Vector.h"
namespace WebCore {
class ScreenOrientationController;
class ScreenOrientationDispatcher FINAL : public blink::WebScreenOrientationListener {
public:
static ScreenOrientationDispatcher& instance();
void addController(ScreenOrientationController*);
void removeController(ScreenOrientationController*);
private:
ScreenOrientationDispatcher();
void purgeControllers();
void startListening();
void stopListening();
virtual void didChangeScreenOrientation(blink::WebScreenOrientation) OVERRIDE;
Vector<ScreenOrientationController*> m_controllers;
bool m_needsPurge;
bool m_isDispatching;
};
}
#endif