Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(209)

Side by Side Diff: third_party/WebKit/Source/core/html/HTMLMediaElement.h

Issue 2039773003: [Android] Added a runtime flag to enable autoplay of muted videos. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: An attempt to add a layout test. Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights reserved. 2 * Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 448 matching lines...) Expand 10 before | Expand all | Expand 10 after
459 459
460 // If the user gesture is required, then this will remove it. Note that 460 // If the user gesture is required, then this will remove it. Note that
461 // one should not generally call this method directly; use the one on 461 // one should not generally call this method directly; use the one on
462 // m_helper and give it a reason. 462 // m_helper and give it a reason.
463 void unlockUserGesture(); 463 void unlockUserGesture();
464 464
465 // Return true if and only if a user gesture is requried for playback. Even 465 // Return true if and only if a user gesture is requried for playback. Even
466 // if isLockedPendingUserGesture() return true, this might return false if 466 // if isLockedPendingUserGesture() return true, this might return false if
467 // the requirement is currently overridden. This does not check if a user 467 // the requirement is currently overridden. This does not check if a user
468 // gesture is currently being processed. 468 // gesture is currently being processed.
469 bool isGestureNeededForPlayback() const; 469 bool isGestureNeededForPlayback();
470 470
471 void setNetworkState(NetworkState); 471 void setNetworkState(NetworkState);
472 472
473 void audioTracksTimerFired(Timer<HTMLMediaElement>*); 473 void audioTracksTimerFired(Timer<HTMLMediaElement>*);
474 474
475 // TODO(liberato): remove once autoplay gesture override experiment conclude s. 475 // TODO(liberato): remove once autoplay gesture override experiment conclude s.
476 void triggerAutoplayViewportCheckForTesting(); 476 void triggerAutoplayViewportCheckForTesting();
477 477
478 void scheduleResolvePlayPromises(); 478 void scheduleResolvePlayPromises();
479 void scheduleRejectPlayPromises(ExceptionCode); 479 void scheduleRejectPlayPromises(ExceptionCode);
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
668 inline bool isHTMLMediaElement(const HTMLElement& element) 668 inline bool isHTMLMediaElement(const HTMLElement& element)
669 { 669 {
670 return isHTMLAudioElement(element) || isHTMLVideoElement(element); 670 return isHTMLAudioElement(element) || isHTMLVideoElement(element);
671 } 671 }
672 672
673 DEFINE_HTMLELEMENT_TYPE_CASTS_WITH_FUNCTION(HTMLMediaElement); 673 DEFINE_HTMLELEMENT_TYPE_CASTS_WITH_FUNCTION(HTMLMediaElement);
674 674
675 } // namespace blink 675 } // namespace blink
676 676
677 #endif // HTMLMediaElement_h 677 #endif // HTMLMediaElement_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698