Upstream version 10.39.225.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / Source / core / loader / NavigationScheduler.h
index cc5059a..50cdb85 100644 (file)
@@ -32,6 +32,8 @@
 #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);
@@ -66,25 +68,26 @@ private:
     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;
@@ -93,14 +96,13 @@ private:
     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