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 | 10 |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 bool is_remote, | 46 bool is_remote, |
47 base::TimeDelta duration) override; | 47 base::TimeDelta duration) override; |
48 void DidPause(int delegate_id, bool reached_end_of_stream) override; | 48 void DidPause(int delegate_id, bool reached_end_of_stream) override; |
49 void PlayerGone(int delegate_id) override; | 49 void PlayerGone(int delegate_id) override; |
50 bool IsHidden() override; | 50 bool IsHidden() override; |
51 | 51 |
52 // content::RenderFrameObserver overrides. | 52 // content::RenderFrameObserver overrides. |
53 void WasHidden() override; | 53 void WasHidden() override; |
54 void WasShown() override; | 54 void WasShown() override; |
55 bool OnMessageReceived(const IPC::Message& msg) override; | 55 bool OnMessageReceived(const IPC::Message& msg) override; |
| 56 void OnDestruct() override; |
56 | 57 |
57 // Zeros out |idle_cleanup_interval_|, and sets |idle_timeout_| to | 58 // Zeros out |idle_cleanup_interval_|, and sets |idle_timeout_| to |
58 // |idle_timeout|. A zero cleanup interval will cause the idle timer to run | 59 // |idle_timeout|. A zero cleanup interval will cause the idle timer to run |
59 // with each run of the message loop. | 60 // with each run of the message loop. |
60 void SetIdleCleanupParamsForTesting(base::TimeDelta idle_timeout, | 61 void SetIdleCleanupParamsForTesting(base::TimeDelta idle_timeout, |
61 base::TickClock* tick_clock); | 62 base::TickClock* tick_clock); |
62 bool IsIdleCleanupTimerRunningForTesting() const { | 63 bool IsIdleCleanupTimerRunningForTesting() const { |
63 return idle_cleanup_timer_.IsRunning(); | 64 return idle_cleanup_timer_.IsRunning(); |
64 } | 65 } |
65 | 66 |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 // for testing. | 100 // for testing. |
100 std::unique_ptr<base::DefaultTickClock> default_tick_clock_; | 101 std::unique_ptr<base::DefaultTickClock> default_tick_clock_; |
101 base::TickClock* tick_clock_; | 102 base::TickClock* tick_clock_; |
102 | 103 |
103 DISALLOW_COPY_AND_ASSIGN(RendererWebMediaPlayerDelegate); | 104 DISALLOW_COPY_AND_ASSIGN(RendererWebMediaPlayerDelegate); |
104 }; | 105 }; |
105 | 106 |
106 } // namespace media | 107 } // namespace media |
107 | 108 |
108 #endif // CONTENT_RENDERER_MEDIA_RENDERER_WEBMEDIAPLAYER_DELEGATE_H_ | 109 #endif // CONTENT_RENDERER_MEDIA_RENDERER_WEBMEDIAPLAYER_DELEGATE_H_ |
OLD | NEW |