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

Unified Diff: third_party/WebKit/Source/core/html/AutoplayUmaHelper.h

Issue 2141093003: Revert "Measure whether muted videos that started playing with play() become visible at some point" (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/core/core.gypi ('k') | third_party/WebKit/Source/core/html/AutoplayUmaHelper.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/html/AutoplayUmaHelper.h
diff --git a/third_party/WebKit/Source/core/html/AutoplayUmaHelper.h b/third_party/WebKit/Source/core/html/AutoplayUmaHelper.h
deleted file mode 100644
index 913b74ed90c7fa3f4c6ec59ae33387d00890f5c8..0000000000000000000000000000000000000000
--- a/third_party/WebKit/Source/core/html/AutoplayUmaHelper.h
+++ /dev/null
@@ -1,67 +0,0 @@
-// Copyright 2016 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef AutoplayUmaHelper_h
-#define AutoplayUmaHelper_h
-
-#include "core/events/EventListener.h"
-#include "platform/heap/Handle.h"
-
-namespace blink {
-
-// These values are used for histograms. Do not reorder.
-enum class AutoplaySource {
- // Autoplay comes from HTMLMediaElement `autoplay` attribute.
- Attribute = 0,
- // Autoplay comes from `play()` method.
- Method = 1,
- // This enum value must be last.
- NumberOfSources = 2,
-};
-
-// These values are used for histograms. Do not reorder.
-enum class AutoplayUnmuteActionStatus {
- Failure = 0,
- Success = 1,
- NumberOfStatus = 2,
-};
-
-class ElementVisibilityObserver;
-class HTMLMediaElement;
-
-class AutoplayUmaHelper final : public EventListener {
-public:
- static AutoplayUmaHelper* create(HTMLMediaElement*);
-
- ~AutoplayUmaHelper();
-
- bool operator==(const EventListener&) const override;
-
- void onAutoplayInitiated(AutoplaySource);
- void onElementDestroyed();
-
- void recordAutoplayUnmuteStatus(AutoplayUnmuteActionStatus);
-
- void onVisibilityChangedForVideoMutedPlayMethod(bool isVisible);
-
- DECLARE_VIRTUAL_TRACE();
-
-private:
- explicit AutoplayUmaHelper(HTMLMediaElement*);
-
- void handleEvent(ExecutionContext*, Event*) override;
-
- void handlePlayingEvent();
-
- // The autoplay source. Use AutoplaySource::NumberOfSources for invalid source.
- AutoplaySource m_source;
- // The media element this UMA helper is attached to. |m_element| owns |this|.
- WeakMember<HTMLMediaElement> m_element;
- // The observer is used to observe whether a muted video autoplaying by play() method become visible at some point.
- Member<ElementVisibilityObserver> m_videoMutedPlayMethodVisibilityObserver;
-};
-
-} // namespace blink
-
-#endif // AutoplayUmaHelper_h
« no previous file with comments | « third_party/WebKit/Source/core/core.gypi ('k') | third_party/WebKit/Source/core/html/AutoplayUmaHelper.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698