OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved. |
3 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) | 3 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) |
4 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) | 4 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 #include "core/loader/FormSubmission.h" | 42 #include "core/loader/FormSubmission.h" |
43 #include "core/loader/FrameLoadRequest.h" | 43 #include "core/loader/FrameLoadRequest.h" |
44 #include "core/loader/FrameLoader.h" | 44 #include "core/loader/FrameLoader.h" |
45 #include "core/loader/FrameLoaderClient.h" | 45 #include "core/loader/FrameLoaderClient.h" |
46 #include "core/loader/FrameLoaderStateMachine.h" | 46 #include "core/loader/FrameLoaderStateMachine.h" |
47 #include "core/page/Page.h" | 47 #include "core/page/Page.h" |
48 #include "platform/SharedBuffer.h" | 48 #include "platform/SharedBuffer.h" |
49 #include "platform/UserGestureIndicator.h" | 49 #include "platform/UserGestureIndicator.h" |
50 #include "platform/scheduler/CancellableTaskFactory.h" | 50 #include "platform/scheduler/CancellableTaskFactory.h" |
51 #include "public/platform/Platform.h" | 51 #include "public/platform/Platform.h" |
| 52 #include "public/platform/WebCachePolicy.h" |
52 #include "public/platform/WebScheduler.h" | 53 #include "public/platform/WebScheduler.h" |
53 #include "wtf/CurrentTime.h" | 54 #include "wtf/CurrentTime.h" |
54 | 55 |
55 namespace blink { | 56 namespace blink { |
56 | 57 |
57 unsigned NavigationDisablerForBeforeUnload::s_navigationDisableCount = 0; | 58 unsigned NavigationDisablerForBeforeUnload::s_navigationDisableCount = 0; |
58 | 59 |
59 class ScheduledNavigation : public GarbageCollectedFinalized<ScheduledNavigation
> { | 60 class ScheduledNavigation : public GarbageCollectedFinalized<ScheduledNavigation
> { |
60 WTF_MAKE_NONCOPYABLE(ScheduledNavigation); | 61 WTF_MAKE_NONCOPYABLE(ScheduledNavigation); |
61 public: | 62 public: |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 } | 139 } |
139 | 140 |
140 bool shouldStartTimer(LocalFrame* frame) override { return frame->document()
->loadEventFinished(); } | 141 bool shouldStartTimer(LocalFrame* frame) override { return frame->document()
->loadEventFinished(); } |
141 | 142 |
142 void fire(LocalFrame* frame) override | 143 void fire(LocalFrame* frame) override |
143 { | 144 { |
144 OwnPtr<UserGestureIndicator> gestureIndicator = createUserGestureIndicat
or(); | 145 OwnPtr<UserGestureIndicator> gestureIndicator = createUserGestureIndicat
or(); |
145 FrameLoadRequest request(originDocument(), url(), "_self"); | 146 FrameLoadRequest request(originDocument(), url(), "_self"); |
146 request.setReplacesCurrentItem(replacesCurrentItem()); | 147 request.setReplacesCurrentItem(replacesCurrentItem()); |
147 if (equalIgnoringFragmentIdentifier(frame->document()->url(), request.re
sourceRequest().url())) | 148 if (equalIgnoringFragmentIdentifier(frame->document()->url(), request.re
sourceRequest().url())) |
148 request.resourceRequest().setCachePolicy(ValidatingCacheData); | 149 request.resourceRequest().setCachePolicy(WebCachePolicy::ValidatingC
acheData); |
149 request.setClientRedirect(ClientRedirectPolicy::ClientRedirect); | 150 request.setClientRedirect(ClientRedirectPolicy::ClientRedirect); |
150 frame->loader().load(request); | 151 frame->loader().load(request); |
151 } | 152 } |
152 | 153 |
153 private: | 154 private: |
154 ScheduledRedirect(double delay, Document* originDocument, const String& url,
bool replacesCurrentItem) | 155 ScheduledRedirect(double delay, Document* originDocument, const String& url,
bool replacesCurrentItem) |
155 : ScheduledURLNavigation(delay, originDocument, url, replacesCurrentItem
, false) | 156 : ScheduledURLNavigation(delay, originDocument, url, replacesCurrentItem
, false) |
156 { | 157 { |
157 clearUserGesture(); | 158 clearUserGesture(); |
158 } | 159 } |
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
445 m_redirect.clear(); | 446 m_redirect.clear(); |
446 } | 447 } |
447 | 448 |
448 DEFINE_TRACE(NavigationScheduler) | 449 DEFINE_TRACE(NavigationScheduler) |
449 { | 450 { |
450 visitor->trace(m_frame); | 451 visitor->trace(m_frame); |
451 visitor->trace(m_redirect); | 452 visitor->trace(m_redirect); |
452 } | 453 } |
453 | 454 |
454 } // namespace blink | 455 } // namespace blink |
OLD | NEW |