#define NavigationScheduler_h
#include "platform/Timer.h"
+#include "platform/heap/Handle.h"
+#include "platform/weborigin/Referrer.h"
#include "wtf/Forward.h"
#include "wtf/HashMap.h"
#include "wtf/Noncopyable.h"
#include "wtf/PassRefPtr.h"
#include "wtf/text/WTFString.h"
-namespace WebCore {
+namespace blink {
+class Document;
class FormSubmission;
-class Frame;
+class LocalFrame;
class ScheduledNavigation;
-class SecurityOrigin;
class NavigationDisablerForBeforeUnload {
WTF_MAKE_NONCOPYABLE(NavigationDisablerForBeforeUnload);
static unsigned s_navigationDisableCount;
};
-class NavigationScheduler {
+class NavigationScheduler FINAL {
WTF_MAKE_NONCOPYABLE(NavigationScheduler);
-
+ DISALLOW_ALLOCATION();
public:
- explicit NavigationScheduler(Frame*);
+ explicit NavigationScheduler(LocalFrame*);
~NavigationScheduler();
bool locationChangePending();
void scheduleRedirect(double delay, const String& url);
- void scheduleLocationChange(SecurityOrigin*, const String& url, const String& referrer, bool lockBackForwardList = true);
- void scheduleFormSubmission(PassRefPtr<FormSubmission>);
- void scheduleRefresh();
+ void scheduleLocationChange(Document*, const String& url, const Referrer& referrer, bool lockBackForwardList = true);
+ void schedulePageBlock(Document*, const Referrer&);
+ void scheduleFormSubmission(PassRefPtrWillBeRawPtr<FormSubmission>);
+ void scheduleReload();
void scheduleHistoryNavigation(int steps);
void startTimer();
-
void cancel();
- void clear();
+
+ void trace(Visitor*);
private:
bool shouldScheduleNavigation() const;
void timerFired(Timer<NavigationScheduler>*);
void schedule(PassOwnPtr<ScheduledNavigation>);
- static bool mustLockBackForwardList(Frame* targetFrame);
+ static bool mustLockBackForwardList(LocalFrame* targetFrame);
- Frame* m_frame;
+ RawPtrWillBeMember<LocalFrame> m_frame;
Timer<NavigationScheduler> m_timer;
OwnPtr<ScheduledNavigation> m_redirect;
- HashMap<String, OwnPtr<ScheduledNavigation> > m_additionalFormSubmissions;
};
-} // namespace WebCore
+} // namespace blink
#endif // NavigationScheduler_h