| 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. | 3 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. |
| 4 * (http://www.torchmobile.com/) | 4 * (http://www.torchmobile.com/) |
| 5 * Copyright (C) 2009 Adam Barth. All rights reserved. | 5 * Copyright (C) 2009 Adam Barth. All rights reserved. |
| 6 * | 6 * |
| 7 * Redistribution and use in source and binary forms, with or without | 7 * Redistribution and use in source and binary forms, with or without |
| 8 * modification, are permitted provided that the following conditions | 8 * modification, are permitted provided that the following conditions |
| 9 * are met: | 9 * are met: |
| 10 * | 10 * |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | 26 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND |
| 27 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 27 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | 28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
| 29 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 29 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 30 */ | 30 */ |
| 31 | 31 |
| 32 #ifndef NavigationScheduler_h | 32 #ifndef NavigationScheduler_h |
| 33 #define NavigationScheduler_h | 33 #define NavigationScheduler_h |
| 34 | 34 |
| 35 #include "core/CoreExport.h" | 35 #include "core/CoreExport.h" |
| 36 #include "core/loader/FrameLoaderTypes.h" |
| 36 #include "platform/WebTaskRunner.h" | 37 #include "platform/WebTaskRunner.h" |
| 37 #include "platform/heap/Handle.h" | 38 #include "platform/heap/Handle.h" |
| 38 #include "public/platform/WebScheduler.h" | 39 #include "public/platform/WebScheduler.h" |
| 39 #include "wtf/Forward.h" | 40 #include "wtf/Forward.h" |
| 40 #include "wtf/HashMap.h" | 41 #include "wtf/HashMap.h" |
| 41 #include "wtf/Noncopyable.h" | 42 #include "wtf/Noncopyable.h" |
| 42 #include "wtf/PassRefPtr.h" | 43 #include "wtf/PassRefPtr.h" |
| 43 #include "wtf/text/WTFString.h" | 44 #include "wtf/text/WTFString.h" |
| 44 #include <memory> | 45 #include <memory> |
| 45 | 46 |
| (...skipping 17 matching lines...) Expand all Loading... |
| 63 | 64 |
| 64 bool locationChangePending(); | 65 bool locationChangePending(); |
| 65 bool isNavigationScheduledWithin(double intervalInSeconds) const; | 66 bool isNavigationScheduledWithin(double intervalInSeconds) const; |
| 66 | 67 |
| 67 void scheduleRedirect(double delay, const String& url); | 68 void scheduleRedirect(double delay, const String& url); |
| 68 void scheduleLocationChange(Document*, | 69 void scheduleLocationChange(Document*, |
| 69 const String& url, | 70 const String& url, |
| 70 bool replacesCurrentItem = true); | 71 bool replacesCurrentItem = true); |
| 71 void schedulePageBlock(Document*, int reason); | 72 void schedulePageBlock(Document*, int reason); |
| 72 void scheduleFormSubmission(Document*, FormSubmission*); | 73 void scheduleFormSubmission(Document*, FormSubmission*); |
| 73 void scheduleReload(); | 74 void scheduleReload(FrameLoadType); |
| 74 | 75 |
| 75 void startTimer(); | 76 void startTimer(); |
| 76 void cancel(); | 77 void cancel(); |
| 77 | 78 |
| 78 DECLARE_TRACE(); | 79 DECLARE_TRACE(); |
| 79 | 80 |
| 80 private: | 81 private: |
| 81 explicit NavigationScheduler(LocalFrame*); | 82 explicit NavigationScheduler(LocalFrame*); |
| 82 | 83 |
| 83 bool shouldScheduleReload() const; | 84 bool shouldScheduleReload() const; |
| (...skipping 24 matching lines...) Expand all Loading... |
| 108 } | 109 } |
| 109 static bool isNavigationAllowed() { return !s_navigationDisableCount; } | 110 static bool isNavigationAllowed() { return !s_navigationDisableCount; } |
| 110 | 111 |
| 111 private: | 112 private: |
| 112 static unsigned s_navigationDisableCount; | 113 static unsigned s_navigationDisableCount; |
| 113 }; | 114 }; |
| 114 | 115 |
| 115 } // namespace blink | 116 } // namespace blink |
| 116 | 117 |
| 117 #endif // NavigationScheduler_h | 118 #endif // NavigationScheduler_h |
| OLD | NEW |