Chromium Code Reviews| Index: chrome/gpu/gpu_arc_video_service.cc |
| diff --git a/chrome/gpu/gpu_arc_video_service.cc b/chrome/gpu/gpu_arc_video_service.cc |
| index 3d788ec4c2fc2fde1bc9e4a39d4540f24e6a5a7c..56d17c7267e14ecca6e3a7845bdc5156365d54ea 100644 |
| --- a/chrome/gpu/gpu_arc_video_service.cc |
| +++ b/chrome/gpu/gpu_arc_video_service.cc |
| @@ -109,7 +109,7 @@ void GpuArcVideoService::Connect( |
| void GpuArcVideoService::OnError(ArcVideoAccelerator::Error error) { |
| DVLOG(2) << "OnError " << error; |
| client_->OnError( |
| - static_cast<::arc::mojom::VideoAcceleratorServiceClient::Error>(error)); |
| + static_cast<::arc::mojom::VideoAcceleratorService::Error>(error)); |
| } |
| void GpuArcVideoService::OnBufferDone(PortType port, |
| @@ -139,9 +139,13 @@ void GpuArcVideoService::Initialize( |
| ::arc::mojom::ArcVideoAcceleratorConfigPtr config, |
| const InitializeCallback& callback) { |
| DVLOG(2) << "Initialize"; |
| - bool result = |
| + ArcVideoAccelerator::Error result = |
| accelerator_->Initialize(config.To<ArcVideoAccelerator::Config>(), this); |
| - callback.Run(result); |
| + if (result == ArcVideoAccelerator::NO_ERROR) { |
| + callback.Run(true, ::arc::mojom::VideoAcceleratorService::Error::NO_ERROR); |
|
Pawel Osciak
2016/06/03 03:56:18
Do we need true/false in the first argument, if we
kcwu
2016/06/03 08:28:58
It's backward compatible if appending parameters,
|
| + } else { |
| + callback.Run(false, ::arc::mojom::VideoAcceleratorService::Error(result)); |
| + } |
| } |
| base::ScopedFD GpuArcVideoService::UnwrapFdFromMojoHandle( |
| @@ -149,7 +153,7 @@ base::ScopedFD GpuArcVideoService::UnwrapFdFromMojoHandle( |
| if (!handle.is_valid()) { |
| LOG(ERROR) << "handle is invalid"; |
| client_->OnError( |
| - ::arc::mojom::VideoAcceleratorServiceClient::Error::INVALID_ARGUMENT); |
| + ::arc::mojom::VideoAcceleratorService::Error::INVALID_ARGUMENT); |
| return base::ScopedFD(); |
| } |
| @@ -159,7 +163,7 @@ base::ScopedFD GpuArcVideoService::UnwrapFdFromMojoHandle( |
| if (mojo_result != MOJO_RESULT_OK) { |
| LOG(ERROR) << "UnwrapPlatformFile failed: " << mojo_result; |
| client_->OnError( |
| - ::arc::mojom::VideoAcceleratorServiceClient::Error::PLATFORM_FAILURE); |
| + ::arc::mojom::VideoAcceleratorService::Error::PLATFORM_FAILURE); |
| return base::ScopedFD(); |
| } |