| 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 3054 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3065 | 3065 |
| 3066 void Internals::setMediaElementNetworkState(HTMLMediaElement* mediaElement, | 3066 void Internals::setMediaElementNetworkState(HTMLMediaElement* mediaElement, |
| 3067 int state) { | 3067 int state) { |
| 3068 ASSERT(mediaElement); | 3068 ASSERT(mediaElement); |
| 3069 ASSERT(state >= WebMediaPlayer::NetworkState::NetworkStateEmpty); | 3069 ASSERT(state >= WebMediaPlayer::NetworkState::NetworkStateEmpty); |
| 3070 ASSERT(state <= WebMediaPlayer::NetworkState::NetworkStateDecodeError); | 3070 ASSERT(state <= WebMediaPlayer::NetworkState::NetworkStateDecodeError); |
| 3071 mediaElement->setNetworkState( | 3071 mediaElement->setNetworkState( |
| 3072 static_cast<WebMediaPlayer::NetworkState>(state)); | 3072 static_cast<WebMediaPlayer::NetworkState>(state)); |
| 3073 } | 3073 } |
| 3074 | 3074 |
| 3075 // TODO(liberato): remove once autoplay gesture override experiment concludes. | |
| 3076 void Internals::triggerAutoplayViewportCheck(HTMLMediaElement* element) { | |
| 3077 element->triggerAutoplayViewportCheckForTesting(); | |
| 3078 } | |
| 3079 | |
| 3080 String Internals::getScrollAnimationState(Node* node) const { | 3075 String Internals::getScrollAnimationState(Node* node) const { |
| 3081 if (ScrollableArea* scrollableArea = scrollableAreaForNode(node)) | 3076 if (ScrollableArea* scrollableArea = scrollableAreaForNode(node)) |
| 3082 return scrollableArea->scrollAnimator().runStateAsText(); | 3077 return scrollableArea->scrollAnimator().runStateAsText(); |
| 3083 return String(); | 3078 return String(); |
| 3084 } | 3079 } |
| 3085 | 3080 |
| 3086 String Internals::getProgrammaticScrollAnimationState(Node* node) const { | 3081 String Internals::getProgrammaticScrollAnimationState(Node* node) const { |
| 3087 if (ScrollableArea* scrollableArea = scrollableAreaForNode(node)) | 3082 if (ScrollableArea* scrollableArea = scrollableAreaForNode(node)) |
| 3088 return scrollableArea->programmaticScrollAnimator().runStateAsText(); | 3083 return scrollableArea->programmaticScrollAnimator().runStateAsText(); |
| 3089 return String(); | 3084 return String(); |
| 3090 } | 3085 } |
| 3091 | 3086 |
| 3092 ClientRect* Internals::visualRect(Node* node) { | 3087 ClientRect* Internals::visualRect(Node* node) { |
| 3093 if (!node || !node->layoutObject()) | 3088 if (!node || !node->layoutObject()) |
| 3094 return ClientRect::create(); | 3089 return ClientRect::create(); |
| 3095 | 3090 |
| 3096 return ClientRect::create(FloatRect(node->layoutObject()->visualRect())); | 3091 return ClientRect::create(FloatRect(node->layoutObject()->visualRect())); |
| 3097 } | 3092 } |
| 3098 | 3093 |
| 3099 void Internals::crash() { | 3094 void Internals::crash() { |
| 3100 CHECK(false) << "Intentional crash"; | 3095 CHECK(false) << "Intentional crash"; |
| 3101 } | 3096 } |
| 3102 | 3097 |
| 3103 void Internals::setIsLowEndDevice(bool isLowEndDevice) { | 3098 void Internals::setIsLowEndDevice(bool isLowEndDevice) { |
| 3104 MemoryCoordinator::setIsLowEndDeviceForTesting(isLowEndDevice); | 3099 MemoryCoordinator::setIsLowEndDeviceForTesting(isLowEndDevice); |
| 3105 } | 3100 } |
| 3106 | 3101 |
| 3107 } // namespace blink | 3102 } // namespace blink |
| OLD | NEW |