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

Side by Side Diff: chromecast/renderer/media/cma_message_filter_proxy.h

Issue 1142513004: Chromecast: MessageLoopProxy cleanup --> SingleThreadTaskRunner. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 7 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
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 CHROMECAST_RENDERER_MEDIA_CMA_MESSAGE_FILTER_PROXY_H_ 5 #ifndef CHROMECAST_RENDERER_MEDIA_CMA_MESSAGE_FILTER_PROXY_H_
6 #define CHROMECAST_RENDERER_MEDIA_CMA_MESSAGE_FILTER_PROXY_H_ 6 #define CHROMECAST_RENDERER_MEDIA_CMA_MESSAGE_FILTER_PROXY_H_
7 7
8 #include "base/id_map.h" 8 #include "base/id_map.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
11 #include "base/memory/shared_memory.h" 11 #include "base/memory/shared_memory.h"
12 #include "base/sync_socket.h" 12 #include "base/sync_socket.h"
13 #include "chromecast/common/media/cma_ipc_common.h" 13 #include "chromecast/common/media/cma_ipc_common.h"
14 #include "chromecast/media/cma/pipeline/av_pipeline_client.h" 14 #include "chromecast/media/cma/pipeline/av_pipeline_client.h"
15 #include "chromecast/media/cma/pipeline/media_pipeline_client.h" 15 #include "chromecast/media/cma/pipeline/media_pipeline_client.h"
16 #include "chromecast/media/cma/pipeline/video_pipeline_client.h" 16 #include "chromecast/media/cma/pipeline/video_pipeline_client.h"
17 #include "ipc/message_filter.h" 17 #include "ipc/message_filter.h"
18 #include "media/base/buffering_state.h" 18 #include "media/base/buffering_state.h"
19 #include "media/base/pipeline_status.h" 19 #include "media/base/pipeline_status.h"
20 20
21 namespace base { 21 namespace base {
22 class MessageLoopProxy; 22 class SingleThreadTaskRunner;
23 } 23 }
24 24
25 namespace chromecast { 25 namespace chromecast {
26 namespace media { 26 namespace media {
27 27
28 typedef base::Callback<void( 28 typedef base::Callback<void(
29 bool, base::SharedMemoryHandle, base::FileDescriptor)> AvPipeCB; 29 bool, base::SharedMemoryHandle, base::FileDescriptor)> AvPipeCB;
30 30
31 class CmaMessageFilterProxy : public IPC::MessageFilter { 31 class CmaMessageFilterProxy : public IPC::MessageFilter {
32 public: 32 public:
(...skipping 19 matching lines...) Expand all
52 VideoDelegate(); 52 VideoDelegate();
53 ~VideoDelegate(); 53 ~VideoDelegate();
54 54
55 AvPipeCB av_pipe_cb; 55 AvPipeCB av_pipe_cb;
56 base::Closure pipe_read_cb; 56 base::Closure pipe_read_cb;
57 ::media::PipelineStatusCB state_changed_cb; 57 ::media::PipelineStatusCB state_changed_cb;
58 VideoPipelineClient client; 58 VideoPipelineClient client;
59 }; 59 };
60 60
61 explicit CmaMessageFilterProxy( 61 explicit CmaMessageFilterProxy(
62 const scoped_refptr<base::MessageLoopProxy>& io_message_loop); 62 const scoped_refptr<base::SingleThreadTaskRunner>& io_task_runner);
63 63
64 // Getter for the one CmaMessageFilterHost object. 64 // Getter for the one CmaMessageFilterHost object.
65 static CmaMessageFilterProxy* Get(); 65 static CmaMessageFilterProxy* Get();
66 66
67 int CreateChannel(); 67 int CreateChannel();
68 void DestroyChannel(int id); 68 void DestroyChannel(int id);
69 69
70 // For adding/removing delegates. 70 // For adding/removing delegates.
71 bool SetMediaDelegate(int id, const MediaDelegate& media_delegate); 71 bool SetMediaDelegate(int id, const MediaDelegate& media_delegate);
72 bool SetAudioDelegate(int id, const AudioDelegate& audio_delegate); 72 bool SetAudioDelegate(int id, const AudioDelegate& audio_delegate);
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 const gfx::Size& natural_size); 117 const gfx::Size& natural_size);
118 118
119 // The singleton instance for this filter. 119 // The singleton instance for this filter.
120 static CmaMessageFilterProxy* filter_; 120 static CmaMessageFilterProxy* filter_;
121 121
122 // A map of media ids to delegates. 122 // A map of media ids to delegates.
123 IDMap<DelegateEntry> delegates_; 123 IDMap<DelegateEntry> delegates_;
124 124
125 IPC::Sender* sender_; 125 IPC::Sender* sender_;
126 126
127 scoped_refptr<base::MessageLoopProxy> const io_message_loop_; 127 scoped_refptr<base::SingleThreadTaskRunner> const io_task_runner_;
128 128
129 DISALLOW_COPY_AND_ASSIGN(CmaMessageFilterProxy); 129 DISALLOW_COPY_AND_ASSIGN(CmaMessageFilterProxy);
130 }; 130 };
131 131
132 } // namespace media 132 } // namespace media
133 } // namespace chromecast 133 } // namespace chromecast
134 134
135 #endif // CHROMECAST_RENDERER_MEDIA_CMA_MESSAGE_FILTER_PROXY_H_ 135 #endif // CHROMECAST_RENDERER_MEDIA_CMA_MESSAGE_FILTER_PROXY_H_
OLDNEW
« no previous file with comments | « chromecast/renderer/media/audio_pipeline_proxy.cc ('k') | chromecast/renderer/media/cma_message_filter_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698