| 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 2349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2360 return surroundingText.content(); | 2360 return surroundingText.content(); |
| 2361 } | 2361 } |
| 2362 | 2362 |
| 2363 void Internals::setFocused(bool focused) | 2363 void Internals::setFocused(bool focused) |
| 2364 { | 2364 { |
| 2365 frame()->page()->focusController().setFocused(focused); | 2365 frame()->page()->focusController().setFocused(focused); |
| 2366 } | 2366 } |
| 2367 | 2367 |
| 2368 void Internals::setInitialFocus(bool reverse) | 2368 void Internals::setInitialFocus(bool reverse) |
| 2369 { | 2369 { |
| 2370 frame()->document()->setFocusedElement(nullptr); | 2370 frame()->document()->clearFocusedElement(); |
| 2371 frame()->page()->focusController().setInitialFocus(reverse ? WebFocusTypeBac
kward : WebFocusTypeForward); | 2371 frame()->page()->focusController().setInitialFocus(reverse ? WebFocusTypeBac
kward : WebFocusTypeForward); |
| 2372 } | 2372 } |
| 2373 | 2373 |
| 2374 bool Internals::ignoreLayoutWithPendingStylesheets(Document* document) | 2374 bool Internals::ignoreLayoutWithPendingStylesheets(Document* document) |
| 2375 { | 2375 { |
| 2376 ASSERT(document); | 2376 ASSERT(document); |
| 2377 return document->ignoreLayoutWithPendingStylesheets(); | 2377 return document->ignoreLayoutWithPendingStylesheets(); |
| 2378 } | 2378 } |
| 2379 | 2379 |
| 2380 void Internals::setNetworkStateNotifierTestOnly(bool testOnly) | 2380 void Internals::setNetworkStateNotifierTestOnly(bool testOnly) |
| (...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2569 mediaElement->setNetworkState(static_cast<WebMediaPlayer::NetworkState>(stat
e)); | 2569 mediaElement->setNetworkState(static_cast<WebMediaPlayer::NetworkState>(stat
e)); |
| 2570 } | 2570 } |
| 2571 | 2571 |
| 2572 // TODO(liberato): remove once autoplay gesture override experiment concludes. | 2572 // TODO(liberato): remove once autoplay gesture override experiment concludes. |
| 2573 void Internals::triggerAutoplayViewportCheck(HTMLMediaElement* element) | 2573 void Internals::triggerAutoplayViewportCheck(HTMLMediaElement* element) |
| 2574 { | 2574 { |
| 2575 element->triggerAutoplayViewportCheckForTesting(); | 2575 element->triggerAutoplayViewportCheckForTesting(); |
| 2576 } | 2576 } |
| 2577 | 2577 |
| 2578 } // namespace blink | 2578 } // namespace blink |
| OLD | NEW |