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

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

Issue 1700743003: Record whether and why the media default controls are being shown. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@media-controls-usecount
Patch Set: review comments Created 4 years, 10 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 427 matching lines...) Expand 10 before | Expand all | Expand 10 after
438 void removeUserGestureRequirement(); 438 void removeUserGestureRequirement();
439 void setInitialPlayWithoutUserGestures(bool); 439 void setInitialPlayWithoutUserGestures(bool);
440 440
441 void setNetworkState(NetworkState); 441 void setNetworkState(NetworkState);
442 442
443 void audioTracksTimerFired(Timer<HTMLMediaElement>*); 443 void audioTracksTimerFired(Timer<HTMLMediaElement>*);
444 444
445 // TODO(liberato): remove once autoplay gesture override experiment conclude s. 445 // TODO(liberato): remove once autoplay gesture override experiment conclude s.
446 void triggerAutoplayViewportCheckForTesting(); 446 void triggerAutoplayViewportCheckForTesting();
447 447
448 bool shouldShowControlsInternal(bool record) const;
sof 2016/02/18 16:12:17 We prefer using enums rather bools in Blink.
philipj_slow 2016/02/19 04:05:43 Yes, see `enum class RecordMetricsBehavior { DoNot
mlamouri (slow - plz ping) 2016/02/23 18:42:13 Re-used this enum. My understanding was that Chrom
449
448 UnthrottledTimer<HTMLMediaElement> m_loadTimer; 450 UnthrottledTimer<HTMLMediaElement> m_loadTimer;
449 UnthrottledTimer<HTMLMediaElement> m_progressEventTimer; 451 UnthrottledTimer<HTMLMediaElement> m_progressEventTimer;
450 UnthrottledTimer<HTMLMediaElement> m_playbackProgressTimer; 452 UnthrottledTimer<HTMLMediaElement> m_playbackProgressTimer;
451 UnthrottledTimer<HTMLMediaElement> m_audioTracksTimer; 453 UnthrottledTimer<HTMLMediaElement> m_audioTracksTimer;
452 PersistentWillBeMember<TimeRanges> m_playedTimeRanges; 454 PersistentWillBeMember<TimeRanges> m_playedTimeRanges;
453 OwnPtrWillBeMember<GenericEventQueue> m_asyncEventQueue; 455 OwnPtrWillBeMember<GenericEventQueue> m_asyncEventQueue;
454 456
455 double m_playbackRate; 457 double m_playbackRate;
456 double m_defaultPlaybackRate; 458 double m_defaultPlaybackRate;
457 NetworkState m_networkState; 459 NetworkState m_networkState;
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
620 inline bool isHTMLMediaElement(const HTMLElement& element) 622 inline bool isHTMLMediaElement(const HTMLElement& element)
621 { 623 {
622 return isHTMLAudioElement(element) || isHTMLVideoElement(element); 624 return isHTMLAudioElement(element) || isHTMLVideoElement(element);
623 } 625 }
624 626
625 DEFINE_HTMLELEMENT_TYPE_CASTS_WITH_FUNCTION(HTMLMediaElement); 627 DEFINE_HTMLELEMENT_TYPE_CASTS_WITH_FUNCTION(HTMLMediaElement);
626 628
627 } // namespace blink 629 } // namespace blink
628 630
629 #endif // HTMLMediaElement_h 631 #endif // HTMLMediaElement_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698