Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(420)

Side by Side Diff: Source/core/loader/NavigationScheduler.cpp

Issue 333593002: Oilpan: Prepare to move FormSubmission to Oilpan heap. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/loader/NavigationScheduler.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 // in both IE and NS (but not in Mozilla). We can't easily do that. 192 // in both IE and NS (but not in Mozilla). We can't easily do that.
193 frame->page()->mainFrame()->loader().client()->navigateBackForward(m_his torySteps); 193 frame->page()->mainFrame()->loader().client()->navigateBackForward(m_his torySteps);
194 } 194 }
195 195
196 private: 196 private:
197 int m_historySteps; 197 int m_historySteps;
198 }; 198 };
199 199
200 class ScheduledFormSubmission FINAL : public ScheduledNavigation { 200 class ScheduledFormSubmission FINAL : public ScheduledNavigation {
201 public: 201 public:
202 ScheduledFormSubmission(PassRefPtr<FormSubmission> submission, bool lockBack ForwardList) 202 ScheduledFormSubmission(PassRefPtrWillBeRawPtr<FormSubmission> submission, b ool lockBackForwardList)
203 : ScheduledNavigation(0, lockBackForwardList, true) 203 : ScheduledNavigation(0, lockBackForwardList, true)
204 , m_submission(submission) 204 , m_submission(submission)
205 { 205 {
206 ASSERT(m_submission->state()); 206 ASSERT(m_submission->state());
207 } 207 }
208 208
209 virtual void fire(LocalFrame* frame) OVERRIDE 209 virtual void fire(LocalFrame* frame) OVERRIDE
210 { 210 {
211 OwnPtr<UserGestureIndicator> gestureIndicator = createUserGestureIndicat or(); 211 OwnPtr<UserGestureIndicator> gestureIndicator = createUserGestureIndicat or();
212 FrameLoadRequest frameRequest(m_submission->state()->sourceDocument()); 212 FrameLoadRequest frameRequest(m_submission->state()->sourceDocument());
213 m_submission->populateFrameLoadRequest(frameRequest); 213 m_submission->populateFrameLoadRequest(frameRequest);
214 frameRequest.setLockBackForwardList(lockBackForwardList()); 214 frameRequest.setLockBackForwardList(lockBackForwardList());
215 frameRequest.setTriggeringEvent(m_submission->event()); 215 frameRequest.setTriggeringEvent(m_submission->event());
216 frameRequest.setFormState(m_submission->state()); 216 frameRequest.setFormState(m_submission->state());
217 frame->loader().load(frameRequest); 217 frame->loader().load(frameRequest);
218 } 218 }
219 219
220 virtual bool isForm() const OVERRIDE { return true; } 220 virtual bool isForm() const OVERRIDE { return true; }
221 FormSubmission* submission() const { return m_submission.get(); } 221 FormSubmission* submission() const { return m_submission.get(); }
222 222
223 private: 223 private:
224 RefPtr<FormSubmission> m_submission; 224 RefPtrWillBePersistent<FormSubmission> m_submission;
225 }; 225 };
226 226
227 NavigationScheduler::NavigationScheduler(LocalFrame* frame) 227 NavigationScheduler::NavigationScheduler(LocalFrame* frame)
228 : m_frame(frame) 228 : m_frame(frame)
229 , m_timer(this, &NavigationScheduler::timerFired) 229 , m_timer(this, &NavigationScheduler::timerFired)
230 { 230 {
231 } 231 }
232 232
233 NavigationScheduler::~NavigationScheduler() 233 NavigationScheduler::~NavigationScheduler()
234 { 234 {
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
314 if (lockBackForwardList) 314 if (lockBackForwardList)
315 request.setClientRedirect(ClientRedirect); 315 request.setClientRedirect(ClientRedirect);
316 m_frame->loader().load(request); 316 m_frame->loader().load(request);
317 return; 317 return;
318 } 318 }
319 } 319 }
320 320
321 schedule(adoptPtr(new ScheduledLocationChange(originDocument, url, referrer, lockBackForwardList))); 321 schedule(adoptPtr(new ScheduledLocationChange(originDocument, url, referrer, lockBackForwardList)));
322 } 322 }
323 323
324 void NavigationScheduler::scheduleFormSubmission(PassRefPtr<FormSubmission> subm ission) 324 void NavigationScheduler::scheduleFormSubmission(PassRefPtrWillBeRawPtr<FormSubm ission> submission)
325 { 325 {
326 ASSERT(m_frame->page()); 326 ASSERT(m_frame->page());
327 schedule(adoptPtr(new ScheduledFormSubmission(submission, mustLockBackForwar dList(m_frame)))); 327 schedule(adoptPtr(new ScheduledFormSubmission(submission, mustLockBackForwar dList(m_frame))));
328 } 328 }
329 329
330 void NavigationScheduler::scheduleRefresh() 330 void NavigationScheduler::scheduleRefresh()
331 { 331 {
332 if (!shouldScheduleNavigation()) 332 if (!shouldScheduleNavigation())
333 return; 333 return;
334 const KURL& url = m_frame->document()->url(); 334 const KURL& url = m_frame->document()->url();
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
408 408
409 void NavigationScheduler::cancel() 409 void NavigationScheduler::cancel()
410 { 410 {
411 if (m_timer.isActive()) 411 if (m_timer.isActive())
412 InspectorInstrumentation::frameClearedScheduledNavigation(m_frame); 412 InspectorInstrumentation::frameClearedScheduledNavigation(m_frame);
413 m_timer.stop(); 413 m_timer.stop();
414 m_redirect.clear(); 414 m_redirect.clear();
415 } 415 }
416 416
417 } // namespace WebCore 417 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/loader/NavigationScheduler.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698