| 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 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 267 // keep the NavigationScheduler alive. | 267 // keep the NavigationScheduler alive. |
| 268 if (m_navigateTaskFactory->isPending()) | 268 if (m_navigateTaskFactory->isPending()) |
| 269 Platform::current()->currentThread()->scheduler()->removePendingNavigati
on(); | 269 Platform::current()->currentThread()->scheduler()->removePendingNavigati
on(); |
| 270 } | 270 } |
| 271 | 271 |
| 272 bool NavigationScheduler::locationChangePending() | 272 bool NavigationScheduler::locationChangePending() |
| 273 { | 273 { |
| 274 return m_redirect && m_redirect->isLocationChange(); | 274 return m_redirect && m_redirect->isLocationChange(); |
| 275 } | 275 } |
| 276 | 276 |
| 277 bool NavigationScheduler::isNavigationScheduled() const | 277 bool NavigationScheduler::isNavigationScheduledWithin(double interval) const |
| 278 { | 278 { |
| 279 return m_redirect; | 279 return m_redirect && m_redirect->delay() <= interval; |
| 280 } | 280 } |
| 281 | 281 |
| 282 inline bool NavigationScheduler::shouldScheduleReload() const | 282 inline bool NavigationScheduler::shouldScheduleReload() const |
| 283 { | 283 { |
| 284 return m_frame->page() && m_frame->isNavigationAllowed() && NavigationDisabl
erForBeforeUnload::isNavigationAllowed(); | 284 return m_frame->page() && m_frame->isNavigationAllowed() && NavigationDisabl
erForBeforeUnload::isNavigationAllowed(); |
| 285 } | 285 } |
| 286 | 286 |
| 287 inline bool NavigationScheduler::shouldScheduleNavigation(const String& url) con
st | 287 inline bool NavigationScheduler::shouldScheduleNavigation(const String& url) con
st |
| 288 { | 288 { |
| 289 return m_frame->page() && m_frame->isNavigationAllowed() && (protocolIsJavaS
cript(url) || NavigationDisablerForBeforeUnload::isNavigationAllowed()); | 289 return m_frame->page() && m_frame->isNavigationAllowed() && (protocolIsJavaS
cript(url) || NavigationDisablerForBeforeUnload::isNavigationAllowed()); |
| (...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 432 m_redirect.clear(); | 432 m_redirect.clear(); |
| 433 } | 433 } |
| 434 | 434 |
| 435 DEFINE_TRACE(NavigationScheduler) | 435 DEFINE_TRACE(NavigationScheduler) |
| 436 { | 436 { |
| 437 visitor->trace(m_frame); | 437 visitor->trace(m_frame); |
| 438 visitor->trace(m_redirect); | 438 visitor->trace(m_redirect); |
| 439 } | 439 } |
| 440 | 440 |
| 441 } // namespace blink | 441 } // namespace blink |
| OLD | NEW |