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

Unified Diff: media/base/filters.h

Issue 155230: Made MediaFilter::host_ and MediaFilter::message_loop_ private. (Closed)
Patch Set: Merge with ToT Created 11 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/renderer/media/buffered_data_source.cc ('k') | media/base/mock_media_filters.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/filters.h
diff --git a/media/base/filters.h b/media/base/filters.h
index bc94d39b67c0e728b0f15a180025ac51008f2bb1..9fd1b2e5fd1898d9de696fbc715df3a9eaa80bb5 100644
--- a/media/base/filters.h
+++ b/media/base/filters.h
@@ -58,26 +58,34 @@ class MediaFilter : public base::RefCountedThreadSafe<MediaFilter> {
public:
MediaFilter() : host_(NULL), message_loop_(NULL) {}
- // Sets the protected member |host_|. This is the first method called by
+ // Sets the private member |host_|. This is the first method called by
// the FilterHost after a filter is created. The host holds a strong
// reference to the filter. The reference held by the host is guaranteed
// to be released before the host object is destroyed by the pipeline.
- virtual void SetFilterHost(FilterHost* host) {
+ virtual void set_host(FilterHost* host) {
DCHECK(host);
DCHECK(!host_);
host_ = host;
}
- // Sets the protected member |message_loop_|, which is used by filters for
+ virtual FilterHost* host() {
+ return host_;
+ }
+
+ // Sets the private member |message_loop_|, which is used by filters for
// processing asynchronous tasks and maintaining synchronized access to
// internal data members. The message loop should be running and exceed the
// lifetime of the filter.
- virtual void SetMessageLoop(MessageLoop* message_loop) {
+ virtual void set_message_loop(MessageLoop* message_loop) {
DCHECK(message_loop);
DCHECK(!message_loop_);
message_loop_ = message_loop;
}
+ virtual MessageLoop* message_loop() {
+ return message_loop_;
+ }
+
// The pipeline is being stopped either as a result of an error or because
// the client called Stop().
virtual void Stop() = 0;
@@ -95,11 +103,10 @@ class MediaFilter : public base::RefCountedThreadSafe<MediaFilter> {
friend class base::RefCountedThreadSafe<MediaFilter>;
virtual ~MediaFilter() {}
- // TODO(scherkus): make these private with public/protected accessors.
+ private:
FilterHost* host_;
MessageLoop* message_loop_;
- private:
DISALLOW_COPY_AND_ASSIGN(MediaFilter);
};
« no previous file with comments | « chrome/renderer/media/buffered_data_source.cc ('k') | media/base/mock_media_filters.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698