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 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
278 void MojoRendererService::InitiateScopedSurfaceRequest( | 278 void MojoRendererService::InitiateScopedSurfaceRequest( |
279 const InitiateScopedSurfaceRequestCallback& callback) { | 279 const InitiateScopedSurfaceRequestCallback& callback) { |
280 if (initiate_surface_request_cb_.is_null()) { | 280 if (initiate_surface_request_cb_.is_null()) { |
281 // |renderer_| is likely not of type MediaPlayerRenderer. | 281 // |renderer_| is likely not of type MediaPlayerRenderer. |
282 // This is an unexpected call, and the connection should be closed. | 282 // This is an unexpected call, and the connection should be closed. |
283 mojo::ReportBadMessage("Unexpected call to InitiateScopedSurfaceRequest."); | 283 mojo::ReportBadMessage("Unexpected call to InitiateScopedSurfaceRequest."); |
284 | 284 |
285 // This may cause |this| to be destructed. | 285 // This may cause |this| to be destructed. |
286 DCHECK(!bad_message_cb_.is_null()); | 286 DCHECK(!bad_message_cb_.is_null()); |
287 bad_message_cb_.Run(); | 287 bad_message_cb_.Run(); |
| 288 |
288 return; | 289 return; |
289 } | 290 } |
290 | 291 |
291 callback.Run(initiate_surface_request_cb_.Run()); | 292 callback.Run(initiate_surface_request_cb_.Run()); |
292 } | 293 } |
| 294 |
293 } // namespace media | 295 } // namespace media |
OLD | NEW |