OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |