| 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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 class CORE_EXPORT NavigationScheduler final { | 85 class CORE_EXPORT NavigationScheduler final { |
| 86 WTF_MAKE_NONCOPYABLE(NavigationScheduler); | 86 WTF_MAKE_NONCOPYABLE(NavigationScheduler); |
| 87 DISALLOW_ALLOCATION(); | 87 DISALLOW_ALLOCATION(); |
| 88 public: | 88 public: |
| 89 explicit NavigationScheduler(LocalFrame*); | 89 explicit NavigationScheduler(LocalFrame*); |
| 90 ~NavigationScheduler(); | 90 ~NavigationScheduler(); |
| 91 | 91 |
| 92 bool locationChangePending(); | 92 bool locationChangePending(); |
| 93 | 93 |
| 94 void scheduleRedirect(double delay, const String& url); | 94 void scheduleRedirect(double delay, const String& url); |
| 95 void scheduleLocationChange(Document*, const String& url, bool lockBackForwa
rdList = true); | 95 void scheduleLocationChange(Document*, const String& url, bool replacesCurre
ntItem = true); |
| 96 void schedulePageBlock(Document*); | 96 void schedulePageBlock(Document*); |
| 97 void scheduleFormSubmission(Document*, PassRefPtrWillBeRawPtr<FormSubmission
>); | 97 void scheduleFormSubmission(Document*, PassRefPtrWillBeRawPtr<FormSubmission
>); |
| 98 void scheduleReload(); | 98 void scheduleReload(); |
| 99 | 99 |
| 100 void startTimer(); | 100 void startTimer(); |
| 101 void cancel(); | 101 void cancel(); |
| 102 | 102 |
| 103 DECLARE_TRACE(); | 103 DECLARE_TRACE(); |
| 104 | 104 |
| 105 private: | 105 private: |
| 106 friend class FrameNavigationDisabler; | 106 friend class FrameNavigationDisabler; |
| 107 | 107 |
| 108 void disableFrameNavigation() { ++m_navigationDisableCount; } | 108 void disableFrameNavigation() { ++m_navigationDisableCount; } |
| 109 void enableFrameNavigation() { --m_navigationDisableCount; } | 109 void enableFrameNavigation() { --m_navigationDisableCount; } |
| 110 bool isFrameNavigationAllowed() const { return !m_navigationDisableCount; } | 110 bool isFrameNavigationAllowed() const { return !m_navigationDisableCount; } |
| 111 | 111 |
| 112 bool shouldScheduleReload() const; | 112 bool shouldScheduleReload() const; |
| 113 bool shouldScheduleNavigation(const String& url) const; | 113 bool shouldScheduleNavigation(const String& url) const; |
| 114 | 114 |
| 115 void timerFired(Timer<NavigationScheduler>*); | 115 void timerFired(Timer<NavigationScheduler>*); |
| 116 void schedule(PassOwnPtrWillBeRawPtr<ScheduledNavigation>); | 116 void schedule(PassOwnPtrWillBeRawPtr<ScheduledNavigation>); |
| 117 | 117 |
| 118 static bool mustLockBackForwardList(LocalFrame* targetFrame); | 118 static bool mustReplaceCurrentItem(LocalFrame* targetFrame); |
| 119 | 119 |
| 120 RawPtrWillBeMember<LocalFrame> m_frame; | 120 RawPtrWillBeMember<LocalFrame> m_frame; |
| 121 Timer<NavigationScheduler> m_timer; | 121 Timer<NavigationScheduler> m_timer; |
| 122 OwnPtrWillBeMember<ScheduledNavigation> m_redirect; | 122 OwnPtrWillBeMember<ScheduledNavigation> m_redirect; |
| 123 int m_navigationDisableCount; | 123 int m_navigationDisableCount; |
| 124 }; | 124 }; |
| 125 | 125 |
| 126 } // namespace blink | 126 } // namespace blink |
| 127 | 127 |
| 128 #endif // NavigationScheduler_h | 128 #endif // NavigationScheduler_h |
| OLD | NEW |