Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(86)

Side by Side Diff: chrome/utility/media_galleries/ipc_data_source.h

Issue 2267963002: Add support for cancellation of demuxer reads. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix and add tests. Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | chrome/utility/media_galleries/ipc_data_source.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #ifndef CHROME_UTILITY_MEDIA_GALLERIES_IPC_DATA_SOURCE_H_ 5 #ifndef CHROME_UTILITY_MEDIA_GALLERIES_IPC_DATA_SOURCE_H_
6 #define CHROME_UTILITY_MEDIA_GALLERIES_IPC_DATA_SOURCE_H_ 6 #define CHROME_UTILITY_MEDIA_GALLERIES_IPC_DATA_SOURCE_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 17 matching lines...) Expand all
28 class IPCDataSource: public media::DataSource, 28 class IPCDataSource: public media::DataSource,
29 public UtilityMessageHandler { 29 public UtilityMessageHandler {
30 public: 30 public:
31 // May only be called on the utility thread. 31 // May only be called on the utility thread.
32 explicit IPCDataSource(int64_t total_size); 32 explicit IPCDataSource(int64_t total_size);
33 ~IPCDataSource() override; 33 ~IPCDataSource() override;
34 34
35 // Implementation of DataSource. These methods may be called on any single 35 // Implementation of DataSource. These methods may be called on any single
36 // thread. First usage of these methods attaches a thread checker. 36 // thread. First usage of these methods attaches a thread checker.
37 void Stop() override; 37 void Stop() override;
38 void Abort() override;
38 void Read(int64_t position, 39 void Read(int64_t position,
39 int size, 40 int size,
40 uint8_t* data, 41 uint8_t* data,
41 const ReadCB& read_cb) override; 42 const ReadCB& read_cb) override;
42 bool GetSize(int64_t* size_out) override; 43 bool GetSize(int64_t* size_out) override;
43 bool IsStreaming() override; 44 bool IsStreaming() override;
44 void SetBitrate(int bitrate) override; 45 void SetBitrate(int bitrate) override;
45 46
46 // Implementation of UtilityMessageHandler. May only be called on the utility 47 // Implementation of UtilityMessageHandler. May only be called on the utility
47 // thread. 48 // thread.
(...skipping 23 matching lines...) Expand all
71 72
72 base::ThreadChecker utility_thread_checker_; 73 base::ThreadChecker utility_thread_checker_;
73 74
74 // Enforces that the DataSource methods are called on one other thread only. 75 // Enforces that the DataSource methods are called on one other thread only.
75 base::ThreadChecker data_source_thread_checker_; 76 base::ThreadChecker data_source_thread_checker_;
76 }; 77 };
77 78
78 } // namespace metadata 79 } // namespace metadata
79 80
80 #endif // CHROME_UTILITY_MEDIA_GALLERIES_IPC_DATA_SOURCE_H_ 81 #endif // CHROME_UTILITY_MEDIA_GALLERIES_IPC_DATA_SOURCE_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/utility/media_galleries/ipc_data_source.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698