| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
| 3 * Copyright (C) 2013 Apple Inc. All rights reserved. | 3 * Copyright (C) 2013 Apple Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * | 8 * |
| 9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 2530 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2541 exceptionState.throwDOMException(InvalidAccessError, "No context documen
t is available."); | 2541 exceptionState.throwDOMException(InvalidAccessError, "No context documen
t is available."); |
| 2542 return 0; | 2542 return 0; |
| 2543 } | 2543 } |
| 2544 | 2544 |
| 2545 return document->loader()->timing().monotonicTimeToZeroBasedDocumentTime(pla
tformTime); | 2545 return document->loader()->timing().monotonicTimeToZeroBasedDocumentTime(pla
tformTime); |
| 2546 } | 2546 } |
| 2547 | 2547 |
| 2548 void Internals::setMediaElementNetworkState(HTMLMediaElement* mediaElement, int
state) | 2548 void Internals::setMediaElementNetworkState(HTMLMediaElement* mediaElement, int
state) |
| 2549 { | 2549 { |
| 2550 ASSERT(mediaElement); | 2550 ASSERT(mediaElement); |
| 2551 ASSERT(state >= HTMLMediaElement::NetworkState::NETWORK_EMPTY); | 2551 ASSERT(state >= WebMediaPlayer::NetworkState::NetworkStateEmpty); |
| 2552 ASSERT(state <= HTMLMediaElement::NetworkState::NETWORK_NO_SOURCE); | 2552 ASSERT(state <= WebMediaPlayer::NetworkState::NetworkStateDecodeError); |
| 2553 mediaElement->setNetworkState(static_cast<WebMediaPlayer::NetworkState>(stat
e)); | 2553 mediaElement->setNetworkState(static_cast<WebMediaPlayer::NetworkState>(stat
e)); |
| 2554 } | 2554 } |
| 2555 | 2555 |
| 2556 // TODO(liberato): remove once autoplay gesture override experiment concludes. | 2556 // TODO(liberato): remove once autoplay gesture override experiment concludes. |
| 2557 void Internals::triggerAutoplayViewportCheck(HTMLMediaElement* element) | 2557 void Internals::triggerAutoplayViewportCheck(HTMLMediaElement* element) |
| 2558 { | 2558 { |
| 2559 element->triggerAutoplayViewportCheckForTesting(); | 2559 element->triggerAutoplayViewportCheckForTesting(); |
| 2560 } | 2560 } |
| 2561 | 2561 |
| 2562 int Internals::getScrollAnimationState(Node* node) const | 2562 int Internals::getScrollAnimationState(Node* node) const |
| 2563 { | 2563 { |
| 2564 if (ScrollableArea* scrollableArea = scrollableAreaForNode(node)) | 2564 if (ScrollableArea* scrollableArea = scrollableAreaForNode(node)) |
| 2565 return static_cast<int>(scrollableArea->scrollAnimator().m_runState); | 2565 return static_cast<int>(scrollableArea->scrollAnimator().m_runState); |
| 2566 return -1; | 2566 return -1; |
| 2567 } | 2567 } |
| 2568 | 2568 |
| 2569 } // namespace blink | 2569 } // namespace blink |
| OLD | NEW |