| Index: media/mojo/clients/mojo_video_decoder.h
 | 
| diff --git a/media/mojo/clients/mojo_video_decoder.h b/media/mojo/clients/mojo_video_decoder.h
 | 
| index 1c0facc01bdb1fae37ec737a704c897ba7d0e321..78d36c324d81a619718d5ee3f7f9ddff83be968b 100644
 | 
| --- a/media/mojo/clients/mojo_video_decoder.h
 | 
| +++ b/media/mojo/clients/mojo_video_decoder.h
 | 
| @@ -50,12 +50,16 @@ class MojoVideoDecoder final : public VideoDecoder,
 | 
|    void OnVideoFrameDecoded(mojom::VideoFramePtr frame) final;
 | 
|  
 | 
|   private:
 | 
| -  void OnInitializeDone(bool status);
 | 
| -  void OnDecodeDone(DecodeStatus status);
 | 
| +  void OnInitializeDone(bool status,
 | 
| +                        bool needs_bitstream_conversion,
 | 
| +                        int32_t max_decode_requests);
 | 
| +  void OnDecodeDone(uint64_t decode_id, DecodeStatus status);
 | 
|    void OnResetDone();
 | 
|  
 | 
|    void BindRemoteDecoder();
 | 
| -  void OnConnectionError();
 | 
| +
 | 
| +  // Cleans up callbacks and blocks future calls.
 | 
| +  void Stop();
 | 
|  
 | 
|    scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
 | 
|    GpuVideoAcceleratorFactories* gpu_factories_;
 | 
| @@ -66,7 +70,8 @@ class MojoVideoDecoder final : public VideoDecoder,
 | 
|  
 | 
|    InitCB init_cb_;
 | 
|    OutputCB output_cb_;
 | 
| -  DecodeCB decode_cb_;
 | 
| +  uint64_t decode_counter_ = 0;
 | 
| +  std::map<uint64_t, DecodeCB> pending_decodes_;
 | 
|    base::Closure reset_cb_;
 | 
|  
 | 
|    mojom::VideoDecoderPtr remote_decoder_;
 | 
| @@ -75,6 +80,10 @@ class MojoVideoDecoder final : public VideoDecoder,
 | 
|    bool has_connection_error_ = false;
 | 
|    mojo::AssociatedBinding<VideoDecoderClient> client_binding_;
 | 
|  
 | 
| +  bool initialized_ = false;
 | 
| +  bool needs_bitstream_conversion_ = false;
 | 
| +  int32_t max_decode_requests_ = 1;
 | 
| +
 | 
|    DISALLOW_COPY_AND_ASSIGN(MojoVideoDecoder);
 | 
|  };
 | 
|  
 | 
| 
 |