| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) | 3 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) |
| 4 * Copyright (C) 2009 Adam Barth. All rights reserved. | 4 * Copyright (C) 2009 Adam Barth. All rights reserved. |
| 5 * | 5 * |
| 6 * Redistribution and use in source and binary forms, with or without | 6 * Redistribution and use in source and binary forms, with or without |
| 7 * modification, are permitted provided that the following conditions | 7 * modification, are permitted provided that the following conditions |
| 8 * are met: | 8 * are met: |
| 9 * | 9 * |
| 10 * 1. Redistributions of source code must retain the above copyright | 10 * 1. Redistributions of source code must retain the above copyright |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 WTF_MAKE_NONCOPYABLE(NavigationScheduler); | 71 WTF_MAKE_NONCOPYABLE(NavigationScheduler); |
| 72 | 72 |
| 73 public: | 73 public: |
| 74 explicit NavigationScheduler(LocalFrame*); | 74 explicit NavigationScheduler(LocalFrame*); |
| 75 ~NavigationScheduler(); | 75 ~NavigationScheduler(); |
| 76 | 76 |
| 77 bool locationChangePending(); | 77 bool locationChangePending(); |
| 78 | 78 |
| 79 void scheduleRedirect(double delay, const String& url); | 79 void scheduleRedirect(double delay, const String& url); |
| 80 void scheduleLocationChange(Document*, const String& url, const Referrer& re
ferrer, bool lockBackForwardList = true); | 80 void scheduleLocationChange(Document*, const String& url, const Referrer& re
ferrer, bool lockBackForwardList = true); |
| 81 void scheduleFormSubmission(PassRefPtr<FormSubmission>); | 81 void scheduleFormSubmission(PassRefPtrWillBeRawPtr<FormSubmission>); |
| 82 void scheduleRefresh(); | 82 void scheduleRefresh(); |
| 83 void scheduleHistoryNavigation(int steps); | 83 void scheduleHistoryNavigation(int steps); |
| 84 | 84 |
| 85 void startTimer(); | 85 void startTimer(); |
| 86 | 86 |
| 87 void cancel(); | 87 void cancel(); |
| 88 void clear(); | 88 void clear(); |
| 89 | 89 |
| 90 private: | 90 private: |
| 91 bool shouldScheduleNavigation() const; | 91 bool shouldScheduleNavigation() const; |
| 92 bool shouldScheduleNavigation(const String& url) const; | 92 bool shouldScheduleNavigation(const String& url) const; |
| 93 | 93 |
| 94 void timerFired(Timer<NavigationScheduler>*); | 94 void timerFired(Timer<NavigationScheduler>*); |
| 95 void schedule(PassOwnPtr<ScheduledNavigation>); | 95 void schedule(PassOwnPtr<ScheduledNavigation>); |
| 96 | 96 |
| 97 static bool mustLockBackForwardList(LocalFrame* targetFrame); | 97 static bool mustLockBackForwardList(LocalFrame* targetFrame); |
| 98 | 98 |
| 99 LocalFrame* m_frame; | 99 LocalFrame* m_frame; |
| 100 Timer<NavigationScheduler> m_timer; | 100 Timer<NavigationScheduler> m_timer; |
| 101 OwnPtr<ScheduledNavigation> m_redirect; | 101 OwnPtr<ScheduledNavigation> m_redirect; |
| 102 }; | 102 }; |
| 103 | 103 |
| 104 } // namespace WebCore | 104 } // namespace WebCore |
| 105 | 105 |
| 106 #endif // NavigationScheduler_h | 106 #endif // NavigationScheduler_h |
| OLD | NEW |