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

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

Issue 212803004: Separate DemuxerHost from DataSourceHost. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 6 years, 8 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 <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 10
(...skipping 14 matching lines...) Expand all
25 // for read operations to succeed. 25 // for read operations to succeed.
26 class IPCDataSource: public media::DataSource, 26 class IPCDataSource: public media::DataSource,
27 public chrome::UtilityMessageHandler { 27 public chrome::UtilityMessageHandler {
28 public: 28 public:
29 // May only be called on the utility thread. 29 // May only be called on the utility thread.
30 explicit IPCDataSource(int64 total_size); 30 explicit IPCDataSource(int64 total_size);
31 virtual ~IPCDataSource(); 31 virtual ~IPCDataSource();
32 32
33 // Implementation of DataSource. These methods may be called on any single 33 // Implementation of DataSource. These methods may be called on any single
34 // thread. First usage of these methods attaches a thread checker. 34 // thread. First usage of these methods attaches a thread checker.
35 virtual void set_host(media::DataSourceHost* host) OVERRIDE;
36 virtual void Stop(const base::Closure& callback) OVERRIDE; 35 virtual void Stop(const base::Closure& callback) OVERRIDE;
37 virtual void Read(int64 position, int size, uint8* data, 36 virtual void Read(int64 position, int size, uint8* data,
38 const ReadCB& read_cb) OVERRIDE; 37 const ReadCB& read_cb) OVERRIDE;
39 virtual bool GetSize(int64* size_out) OVERRIDE; 38 virtual bool GetSize(int64* size_out) OVERRIDE;
40 virtual bool IsStreaming() OVERRIDE; 39 virtual bool IsStreaming() OVERRIDE;
41 virtual void SetBitrate(int bitrate) OVERRIDE; 40 virtual void SetBitrate(int bitrate) OVERRIDE;
42 41
43 // Implementation of UtilityMessageHandler. May only be called on the utility 42 // Implementation of UtilityMessageHandler. May only be called on the utility
44 // thread. 43 // thread.
45 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; 44 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
(...skipping 20 matching lines...) Expand all
66 65
67 base::ThreadChecker utility_thread_checker_; 66 base::ThreadChecker utility_thread_checker_;
68 67
69 // Enforces that the DataSource methods are called on one other thread only. 68 // Enforces that the DataSource methods are called on one other thread only.
70 base::ThreadChecker data_source_thread_checker_; 69 base::ThreadChecker data_source_thread_checker_;
71 }; 70 };
72 71
73 } // namespace metadata 72 } // namespace metadata
74 73
75 #endif // CHROME_UTILITY_MEDIA_GALLERIES_IPC_DATA_SOURCE_H_ 74 #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