OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #include "media/mojo/services/mojo_renderer_service.h" | 5 #include "media/mojo/services/mojo_renderer_service.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "media/base/media_keys.h" | 10 #include "media/base/media_keys.h" |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 client_->OnError(); | 108 client_->OnError(); |
109 } | 109 } |
110 | 110 |
111 void MojoRendererService::OnEnded() { | 111 void MojoRendererService::OnEnded() { |
112 DVLOG(1) << __FUNCTION__; | 112 DVLOG(1) << __FUNCTION__; |
113 CancelPeriodicMediaTimeUpdates(); | 113 CancelPeriodicMediaTimeUpdates(); |
114 client_->OnEnded(); | 114 client_->OnEnded(); |
115 } | 115 } |
116 | 116 |
117 void MojoRendererService::OnStatisticsUpdate(const PipelineStatistics& stats) { | 117 void MojoRendererService::OnStatisticsUpdate(const PipelineStatistics& stats) { |
118 // TODO(alokp): Plumb the event to mojom::RendererClient. crbug/585287 | 118 DVLOG(3) << __FUNCTION__; |
| 119 client_->OnStatisticsUpdate(stats); |
119 } | 120 } |
120 | 121 |
121 void MojoRendererService::OnBufferingStateChange(BufferingState state) { | 122 void MojoRendererService::OnBufferingStateChange(BufferingState state) { |
122 DVLOG(2) << __FUNCTION__ << "(" << state << ")"; | 123 DVLOG(2) << __FUNCTION__ << "(" << state << ")"; |
123 client_->OnBufferingStateChange(static_cast<mojom::BufferingState>(state)); | 124 client_->OnBufferingStateChange(static_cast<mojom::BufferingState>(state)); |
124 } | 125 } |
125 | 126 |
126 void MojoRendererService::OnWaitingForDecryptionKey() { | 127 void MojoRendererService::OnWaitingForDecryptionKey() { |
127 // TODO(alokp): Plumb the event to mojom::RendererClient. crbug/585287 | 128 DVLOG(1) << __FUNCTION__; |
| 129 client_->OnWaitingForDecryptionKey(); |
128 } | 130 } |
129 | 131 |
130 void MojoRendererService::OnVideoNaturalSizeChange(const gfx::Size& size) { | 132 void MojoRendererService::OnVideoNaturalSizeChange(const gfx::Size& size) { |
131 DVLOG(2) << __FUNCTION__ << "(" << size.ToString() << ")"; | 133 DVLOG(2) << __FUNCTION__ << "(" << size.ToString() << ")"; |
132 client_->OnVideoNaturalSizeChange(size); | 134 client_->OnVideoNaturalSizeChange(size); |
133 } | 135 } |
134 | 136 |
135 void MojoRendererService::OnVideoOpacityChange(bool opaque) { | 137 void MojoRendererService::OnVideoOpacityChange(bool opaque) { |
136 DVLOG(2) << __FUNCTION__ << "(" << opaque << ")"; | 138 DVLOG(2) << __FUNCTION__ << "(" << opaque << ")"; |
137 client_->OnVideoOpacityChange(opaque); | 139 client_->OnVideoOpacityChange(opaque); |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
200 bool success) { | 202 bool success) { |
201 DVLOG(1) << __FUNCTION__ << "(" << success << ")"; | 203 DVLOG(1) << __FUNCTION__ << "(" << success << ")"; |
202 | 204 |
203 if (success) | 205 if (success) |
204 cdm_ = cdm; | 206 cdm_ = cdm; |
205 | 207 |
206 callback.Run(success); | 208 callback.Run(success); |
207 } | 209 } |
208 | 210 |
209 } // namespace media | 211 } // namespace media |
OLD | NEW |