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

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

Issue 2813303005: [Blink>Media] Moving autoplay logic to AutoplayPolicy (Closed)
Patch Set: addressed nits Created 3 years, 8 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 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef AutoplayUmaHelper_h 5 #ifndef AutoplayUmaHelper_h
6 #define AutoplayUmaHelper_h 6 #define AutoplayUmaHelper_h
7 7
8 #include "core/CoreExport.h" 8 #include "core/CoreExport.h"
9 #include "core/dom/ContextLifecycleObserver.h" 9 #include "core/dom/ContextLifecycleObserver.h"
10 #include "core/events/EventListener.h" 10 #include "core/events/EventListener.h"
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 68
69 bool operator==(const EventListener&) const override; 69 bool operator==(const EventListener&) const override;
70 70
71 void ContextDestroyed(ExecutionContext*) override; 71 void ContextDestroyed(ExecutionContext*) override;
72 72
73 void OnAutoplayInitiated(AutoplaySource); 73 void OnAutoplayInitiated(AutoplaySource);
74 74
75 void RecordCrossOriginAutoplayResult(CrossOriginAutoplayResult); 75 void RecordCrossOriginAutoplayResult(CrossOriginAutoplayResult);
76 void RecordAutoplayUnmuteStatus(AutoplayUnmuteActionStatus); 76 void RecordAutoplayUnmuteStatus(AutoplayUnmuteActionStatus);
77 77
78 void VideoWillBeDrawnToCanvas();
78 void DidMoveToNewDocument(Document& old_document); 79 void DidMoveToNewDocument(Document& old_document);
79 80
80 bool IsVisible() const { return is_visible_; } 81 bool IsVisible() const { return is_visible_; }
81 82
82 bool HasSource() const { return !sources_.empty(); } 83 bool HasSource() const { return !sources_.empty(); }
83 84
84 DECLARE_VIRTUAL_TRACE(); 85 DECLARE_VIRTUAL_TRACE();
85 86
86 private: 87 private:
87 friend class MockAutoplayUmaHelper; 88 friend class MockAutoplayUmaHelper;
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 // The observer is used to observer an autoplaying muted video changing it's 142 // The observer is used to observer an autoplaying muted video changing it's
142 // visibility, which is used for offscreen duration UMA. The UMA is pending 143 // visibility, which is used for offscreen duration UMA. The UMA is pending
143 // for recording as long as this observer is non-null. 144 // for recording as long as this observer is non-null.
144 Member<ElementVisibilityObserver> 145 Member<ElementVisibilityObserver>
145 muted_video_offscreen_duration_visibility_observer_; 146 muted_video_offscreen_duration_visibility_observer_;
146 }; 147 };
147 148
148 } // namespace blink 149 } // namespace blink
149 150
150 #endif // AutoplayUmaHelper_h 151 #endif // AutoplayUmaHelper_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698