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 411 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
422 | 422 |
423 ASSERT(m_frame->page()); | 423 ASSERT(m_frame->page()); |
424 if (m_navigateTaskFactory->isPending()) | 424 if (m_navigateTaskFactory->isPending()) |
425 return; | 425 return; |
426 if (!m_redirect->shouldStartTimer(m_frame)) | 426 if (!m_redirect->shouldStartTimer(m_frame)) |
427 return; | 427 return; |
428 | 428 |
429 WebScheduler* scheduler = Platform::current()->currentThread()->scheduler(); | 429 WebScheduler* scheduler = Platform::current()->currentThread()->scheduler(); |
430 scheduler->addPendingNavigation(); | 430 scheduler->addPendingNavigation(); |
431 scheduler->loadingTaskRunner()->postDelayedTask( | 431 scheduler->loadingTaskRunner()->postDelayedTask( |
432 FROM_HERE, m_navigateTaskFactory->cancelAndCreate(), m_redirect->delay()
* 1000.0); | 432 BLINK_FROM_HERE, m_navigateTaskFactory->cancelAndCreate(), m_redirect->d
elay() * 1000.0); |
433 | 433 |
434 InspectorInstrumentation::frameScheduledNavigation(m_frame, m_redirect->dela
y()); | 434 InspectorInstrumentation::frameScheduledNavigation(m_frame, m_redirect->dela
y()); |
435 } | 435 } |
436 | 436 |
437 void NavigationScheduler::cancel() | 437 void NavigationScheduler::cancel() |
438 { | 438 { |
439 if (m_navigateTaskFactory->isPending()) { | 439 if (m_navigateTaskFactory->isPending()) { |
440 Platform::current()->currentThread()->scheduler()->removePendingNavigati
on(); | 440 Platform::current()->currentThread()->scheduler()->removePendingNavigati
on(); |
441 InspectorInstrumentation::frameClearedScheduledNavigation(m_frame); | 441 InspectorInstrumentation::frameClearedScheduledNavigation(m_frame); |
442 } | 442 } |
443 m_navigateTaskFactory->cancel(); | 443 m_navigateTaskFactory->cancel(); |
444 m_redirect.clear(); | 444 m_redirect.clear(); |
445 } | 445 } |
446 | 446 |
447 DEFINE_TRACE(NavigationScheduler) | 447 DEFINE_TRACE(NavigationScheduler) |
448 { | 448 { |
449 visitor->trace(m_frame); | 449 visitor->trace(m_frame); |
450 visitor->trace(m_redirect); | 450 visitor->trace(m_redirect); |
451 } | 451 } |
452 | 452 |
453 } // namespace blink | 453 } // namespace blink |
OLD | NEW |