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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 { | 61 { |
62 ASSERT(s_navigationDisableCount); | 62 ASSERT(s_navigationDisableCount); |
63 s_navigationDisableCount--; | 63 s_navigationDisableCount--; |
64 } | 64 } |
65 static bool isNavigationAllowed() { return !s_navigationDisableCount; } | 65 static bool isNavigationAllowed() { return !s_navigationDisableCount; } |
66 | 66 |
67 private: | 67 private: |
68 static unsigned s_navigationDisableCount; | 68 static unsigned s_navigationDisableCount; |
69 }; | 69 }; |
70 | 70 |
71 class NavigationScheduler FINAL { | 71 class NavigationScheduler final { |
72 WTF_MAKE_NONCOPYABLE(NavigationScheduler); | 72 WTF_MAKE_NONCOPYABLE(NavigationScheduler); |
73 DISALLOW_ALLOCATION(); | 73 DISALLOW_ALLOCATION(); |
74 public: | 74 public: |
75 explicit NavigationScheduler(LocalFrame*); | 75 explicit NavigationScheduler(LocalFrame*); |
76 ~NavigationScheduler(); | 76 ~NavigationScheduler(); |
77 | 77 |
78 bool locationChangePending(); | 78 bool locationChangePending(); |
79 | 79 |
80 void scheduleRedirect(double delay, const String& url); | 80 void scheduleRedirect(double delay, const String& url); |
81 void scheduleLocationChange(Document*, const String& url, const Referrer& re
ferrer, bool lockBackForwardList = true); | 81 void scheduleLocationChange(Document*, const String& url, const Referrer& re
ferrer, bool lockBackForwardList = true); |
(...skipping 17 matching lines...) Expand all Loading... |
99 static bool mustLockBackForwardList(LocalFrame* targetFrame); | 99 static bool mustLockBackForwardList(LocalFrame* targetFrame); |
100 | 100 |
101 RawPtrWillBeMember<LocalFrame> m_frame; | 101 RawPtrWillBeMember<LocalFrame> m_frame; |
102 Timer<NavigationScheduler> m_timer; | 102 Timer<NavigationScheduler> m_timer; |
103 OwnPtr<ScheduledNavigation> m_redirect; | 103 OwnPtr<ScheduledNavigation> m_redirect; |
104 }; | 104 }; |
105 | 105 |
106 } // namespace blink | 106 } // namespace blink |
107 | 107 |
108 #endif // NavigationScheduler_h | 108 #endif // NavigationScheduler_h |
OLD | NEW |