OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "ppapi/cpp/dev/video_decoder_client_dev.h" | 5 #include "ppapi/cpp/dev/video_decoder_client_dev.h" |
6 | 6 |
7 #include "ppapi/c/dev/ppp_video_decoder_dev.h" | 7 #include "ppapi/c/dev/ppp_video_decoder_dev.h" |
8 #include "ppapi/cpp/dev/video_decoder_dev.h" | 8 #include "ppapi/cpp/dev/video_decoder_dev.h" |
9 #include "ppapi/cpp/instance.h" | 9 #include "ppapi/cpp/instance.h" |
10 #include "ppapi/cpp/instance_handle.h" | 10 #include "ppapi/cpp/instance_handle.h" |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 | 63 |
64 static PPP_VideoDecoder_Dev videodecoder_interface = { | 64 static PPP_VideoDecoder_Dev videodecoder_interface = { |
65 &ProvidePictureBuffers, | 65 &ProvidePictureBuffers, |
66 &DismissPictureBuffer, | 66 &DismissPictureBuffer, |
67 &PictureReady, | 67 &PictureReady, |
68 &NotifyError, | 68 &NotifyError, |
69 }; | 69 }; |
70 | 70 |
71 } // namespace | 71 } // namespace |
72 | 72 |
73 VideoDecoderClient_Dev::VideoDecoderClient_Dev(const InstanceHandle& instance) | 73 VideoDecoderClient_Dev::VideoDecoderClient_Dev(Instance* instance) |
74 : associated_instance_(instance) { | 74 : associated_instance_(instance) { |
75 Module::Get()->AddPluginInterface(kPPPVideoDecoderInterface, | 75 Module::Get()->AddPluginInterface(kPPPVideoDecoderInterface, |
76 &videodecoder_interface); | 76 &videodecoder_interface); |
77 Instance::AddPerInstanceObject(instance, kPPPVideoDecoderInterface, this); | 77 instance->AddPerInstanceObject(kPPPVideoDecoderInterface, this); |
78 } | 78 } |
79 | 79 |
80 VideoDecoderClient_Dev::~VideoDecoderClient_Dev() { | 80 VideoDecoderClient_Dev::~VideoDecoderClient_Dev() { |
81 Instance::RemovePerInstanceObject(associated_instance_, | 81 Instance::RemovePerInstanceObject(associated_instance_, |
82 kPPPVideoDecoderInterface, this); | 82 kPPPVideoDecoderInterface, this); |
83 } | 83 } |
84 | 84 |
85 } // namespace pp | 85 } // namespace pp |
OLD | NEW |