OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 CONTENT_RENDERER_MEDIA_RENDERER_WEBMEDIAPLAYER_DELEGATE_H_ | 5 #ifndef CONTENT_RENDERER_MEDIA_RENDERER_WEBMEDIAPLAYER_DELEGATE_H_ |
6 #define CONTENT_RENDERER_MEDIA_RENDERER_WEBMEDIAPLAYER_DELEGATE_H_ | 6 #define CONTENT_RENDERER_MEDIA_RENDERER_WEBMEDIAPLAYER_DELEGATE_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <memory> | 9 #include <memory> |
10 #include <set> | 10 #include <set> |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 // Note: Does not call OnFrameHidden()/OnFrameShown(). | 76 // Note: Does not call OnFrameHidden()/OnFrameShown(). |
77 void SetFrameHiddenForTesting(bool is_hidden); | 77 void SetFrameHiddenForTesting(bool is_hidden); |
78 | 78 |
79 friend class RendererWebMediaPlayerDelegateTest; | 79 friend class RendererWebMediaPlayerDelegateTest; |
80 | 80 |
81 private: | 81 private: |
82 void OnMediaDelegatePause(int player_id); | 82 void OnMediaDelegatePause(int player_id); |
83 void OnMediaDelegatePlay(int player_id); | 83 void OnMediaDelegatePlay(int player_id); |
84 void OnMediaDelegateSuspendAllMediaPlayers(); | 84 void OnMediaDelegateSuspendAllMediaPlayers(); |
85 void OnMediaDelegateVolumeMultiplierUpdate(int player_id, double multiplier); | 85 void OnMediaDelegateVolumeMultiplierUpdate(int player_id, double multiplier); |
| 86 void OnMediaDelegateBecamePersistentVideo(int player_id, bool value); |
86 | 87 |
87 // Schedules UpdateTask() to run soon. | 88 // Schedules UpdateTask() to run soon. |
88 void ScheduleUpdateTask(); | 89 void ScheduleUpdateTask(); |
89 | 90 |
90 // Processes state changes, dispatches CleanupIdlePlayers(). | 91 // Processes state changes, dispatches CleanupIdlePlayers(). |
91 void UpdateTask(); | 92 void UpdateTask(); |
92 | 93 |
93 // Records UMAs about background playback. | 94 // Records UMAs about background playback. |
94 void RecordBackgroundVideoPlayback(); | 95 void RecordBackgroundVideoPlayback(); |
95 | 96 |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 // Determined at construction time based on system information; determines | 146 // Determined at construction time based on system information; determines |
146 // when the idle cleanup timer should be fired more aggressively. | 147 // when the idle cleanup timer should be fired more aggressively. |
147 bool is_low_end_device_; | 148 bool is_low_end_device_; |
148 | 149 |
149 DISALLOW_COPY_AND_ASSIGN(RendererWebMediaPlayerDelegate); | 150 DISALLOW_COPY_AND_ASSIGN(RendererWebMediaPlayerDelegate); |
150 }; | 151 }; |
151 | 152 |
152 } // namespace media | 153 } // namespace media |
153 | 154 |
154 #endif // CONTENT_RENDERER_MEDIA_RENDERER_WEBMEDIAPLAYER_DELEGATE_H_ | 155 #endif // CONTENT_RENDERER_MEDIA_RENDERER_WEBMEDIAPLAYER_DELEGATE_H_ |
OLD | NEW |