| 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 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 141 void MojoRendererService::OnWaitingForDecryptionKey() { | 141 void MojoRendererService::OnWaitingForDecryptionKey() { |
| 142 DVLOG(1) << __FUNCTION__; | 142 DVLOG(1) << __FUNCTION__; |
| 143 client_->OnWaitingForDecryptionKey(); | 143 client_->OnWaitingForDecryptionKey(); |
| 144 } | 144 } |
| 145 | 145 |
| 146 void MojoRendererService::OnVideoNaturalSizeChange(const gfx::Size& size) { | 146 void MojoRendererService::OnVideoNaturalSizeChange(const gfx::Size& size) { |
| 147 DVLOG(2) << __FUNCTION__ << "(" << size.ToString() << ")"; | 147 DVLOG(2) << __FUNCTION__ << "(" << size.ToString() << ")"; |
| 148 client_->OnVideoNaturalSizeChange(size); | 148 client_->OnVideoNaturalSizeChange(size); |
| 149 } | 149 } |
| 150 | 150 |
| 151 void MojoRendererService::OnDurationChange(base::TimeDelta duration) { |
| 152 client_->OnDurationChange(duration.InMicroseconds()); |
| 153 } |
| 154 |
| 151 void MojoRendererService::OnVideoOpacityChange(bool opaque) { | 155 void MojoRendererService::OnVideoOpacityChange(bool opaque) { |
| 152 DVLOG(2) << __FUNCTION__ << "(" << opaque << ")"; | 156 DVLOG(2) << __FUNCTION__ << "(" << opaque << ")"; |
| 153 client_->OnVideoOpacityChange(opaque); | 157 client_->OnVideoOpacityChange(opaque); |
| 154 } | 158 } |
| 155 | 159 |
| 156 void MojoRendererService::OnStreamReady( | 160 void MojoRendererService::OnStreamReady( |
| 157 const base::Callback<void(bool)>& callback) { | 161 const base::Callback<void(bool)>& callback) { |
| 158 DCHECK_EQ(state_, STATE_INITIALIZING); | 162 DCHECK_EQ(state_, STATE_INITIALIZING); |
| 159 | 163 |
| 160 renderer_->Initialize( | 164 renderer_->Initialize( |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 216 bool success) { | 220 bool success) { |
| 217 DVLOG(1) << __FUNCTION__ << "(" << success << ")"; | 221 DVLOG(1) << __FUNCTION__ << "(" << success << ")"; |
| 218 | 222 |
| 219 if (success) | 223 if (success) |
| 220 cdm_ = cdm; | 224 cdm_ = cdm; |
| 221 | 225 |
| 222 callback.Run(success); | 226 callback.Run(success); |
| 223 } | 227 } |
| 224 | 228 |
| 225 } // namespace media | 229 } // namespace media |
| OLD | NEW |