| 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 403 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 414 if (!m_redirect) | 414 if (!m_redirect) |
| 415 return; | 415 return; |
| 416 | 416 |
| 417 ASSERT(m_frame->page()); | 417 ASSERT(m_frame->page()); |
| 418 if (m_navigateTaskFactory->isPending()) | 418 if (m_navigateTaskFactory->isPending()) |
| 419 return; | 419 return; |
| 420 if (!m_redirect->shouldStartTimer(m_frame)) | 420 if (!m_redirect->shouldStartTimer(m_frame)) |
| 421 return; | 421 return; |
| 422 | 422 |
| 423 Platform::current()->currentThread()->scheduler()->loadingTaskRunner()->post
DelayedTask( | 423 Platform::current()->currentThread()->scheduler()->loadingTaskRunner()->post
DelayedTask( |
| 424 FROM_HERE, m_navigateTaskFactory->cancelAndCreate(), m_redirect->delay()
); | 424 FROM_HERE, m_navigateTaskFactory->cancelAndCreate(), m_redirect->delay()
* 1000.0); |
| 425 | 425 |
| 426 InspectorInstrumentation::frameScheduledNavigation(m_frame, m_redirect->dela
y()); | 426 InspectorInstrumentation::frameScheduledNavigation(m_frame, m_redirect->dela
y()); |
| 427 } | 427 } |
| 428 | 428 |
| 429 void NavigationScheduler::cancel() | 429 void NavigationScheduler::cancel() |
| 430 { | 430 { |
| 431 if (m_navigateTaskFactory->isPending()) | 431 if (m_navigateTaskFactory->isPending()) |
| 432 InspectorInstrumentation::frameClearedScheduledNavigation(m_frame); | 432 InspectorInstrumentation::frameClearedScheduledNavigation(m_frame); |
| 433 m_navigateTaskFactory->cancel(); | 433 m_navigateTaskFactory->cancel(); |
| 434 m_redirect.clear(); | 434 m_redirect.clear(); |
| 435 } | 435 } |
| 436 | 436 |
| 437 DEFINE_TRACE(NavigationScheduler) | 437 DEFINE_TRACE(NavigationScheduler) |
| 438 { | 438 { |
| 439 visitor->trace(m_frame); | 439 visitor->trace(m_frame); |
| 440 visitor->trace(m_redirect); | 440 visitor->trace(m_redirect); |
| 441 } | 441 } |
| 442 | 442 |
| 443 } // namespace blink | 443 } // namespace blink |
| OLD | NEW |