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 "base/optional.h" | 10 #include "base/optional.h" |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
158 client_->OnEnded(); | 158 client_->OnEnded(); |
159 } | 159 } |
160 | 160 |
161 void MojoRendererService::OnStatisticsUpdate(const PipelineStatistics& stats) { | 161 void MojoRendererService::OnStatisticsUpdate(const PipelineStatistics& stats) { |
162 DVLOG(3) << __FUNCTION__; | 162 DVLOG(3) << __FUNCTION__; |
163 client_->OnStatisticsUpdate(stats); | 163 client_->OnStatisticsUpdate(stats); |
164 } | 164 } |
165 | 165 |
166 void MojoRendererService::OnBufferingStateChange(BufferingState state) { | 166 void MojoRendererService::OnBufferingStateChange(BufferingState state) { |
167 DVLOG(2) << __FUNCTION__ << "(" << state << ")"; | 167 DVLOG(2) << __FUNCTION__ << "(" << state << ")"; |
168 client_->OnBufferingStateChange(static_cast<mojom::BufferingState>(state)); | 168 client_->OnBufferingStateChange(state); |
169 } | 169 } |
170 | 170 |
171 void MojoRendererService::OnWaitingForDecryptionKey() { | 171 void MojoRendererService::OnWaitingForDecryptionKey() { |
172 DVLOG(1) << __FUNCTION__; | 172 DVLOG(1) << __FUNCTION__; |
173 client_->OnWaitingForDecryptionKey(); | 173 client_->OnWaitingForDecryptionKey(); |
174 } | 174 } |
175 | 175 |
176 void MojoRendererService::OnVideoNaturalSizeChange(const gfx::Size& size) { | 176 void MojoRendererService::OnVideoNaturalSizeChange(const gfx::Size& size) { |
177 DVLOG(2) << __FUNCTION__ << "(" << size.ToString() << ")"; | 177 DVLOG(2) << __FUNCTION__ << "(" << size.ToString() << ")"; |
178 client_->OnVideoNaturalSizeChange(size); | 178 client_->OnVideoNaturalSizeChange(size); |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
268 // |renderer_| is likely not of type MediaPlayerRenderer. | 268 // |renderer_| is likely not of type MediaPlayerRenderer. |
269 // This is an unexpected call, and the connection should be closed. | 269 // This is an unexpected call, and the connection should be closed. |
270 mojo::ReportBadMessage("Unexpected call to InitiateScopedSurfaceRequest."); | 270 mojo::ReportBadMessage("Unexpected call to InitiateScopedSurfaceRequest."); |
271 binding_->Close(); | 271 binding_->Close(); |
272 return; | 272 return; |
273 } | 273 } |
274 | 274 |
275 callback.Run(initiate_surface_request_cb_.Run()); | 275 callback.Run(initiate_surface_request_cb_.Run()); |
276 } | 276 } |
277 } // namespace media | 277 } // namespace media |
OLD | NEW |