Chromium Code Reviews| Index: media/cdm/ppapi/cdm_file_io_impl.h |
| diff --git a/media/cdm/ppapi/cdm_file_io_impl.h b/media/cdm/ppapi/cdm_file_io_impl.h |
| index fc8215a17a863850f3fbd5bfd2e30a99c248c8e6..345088ea2686c17a0ce2af584765c7d368d1075e 100644 |
| --- a/media/cdm/ppapi/cdm_file_io_impl.h |
| +++ b/media/cdm/ppapi/cdm_file_io_impl.h |
| @@ -35,7 +35,11 @@ class CdmFileIOImpl : public cdm::FileIO { |
| DISALLOW_COPY_AND_ASSIGN(ResourceTracker); |
| }; |
| - CdmFileIOImpl(cdm::FileIOClient* client, PP_Instance pp_instance); |
| + // After the first successful file read, call |file_read_cb| to report the |
| + // file size. |file_read_cb| takes one parameter: the file size in bytes. |
| + CdmFileIOImpl(cdm::FileIOClient* client, |
| + PP_Instance pp_instance, |
| + const pp::CompletionCallback& file_read_cb); |
|
ddorwin
2014/09/14 21:47:59
rename the cb here too?
xhwang
2014/09/15 03:44:31
Done.
|
| // cdm::FileIO implementation. |
| virtual void Open(const char* file_name, uint32_t file_name_size) OVERRIDE; |
| @@ -158,6 +162,11 @@ class CdmFileIOImpl : public cdm::FileIO { |
| // when read completes. |
| std::vector<char> cumulative_read_buffer_; |
| + bool first_file_read_reported_; |
| + |
| + // Callback to report the file size in bytes after the first successful read. |
| + pp::CompletionCallback file_read_cb_; |
| + |
| DISALLOW_COPY_AND_ASSIGN(CdmFileIOImpl); |
| }; |