| OLD | NEW |
| 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_RENDERER_MEDIA_CAST_IPC_DISPATCHER_H_ | 5 #ifndef CHROME_RENDERER_MEDIA_CAST_IPC_DISPATCHER_H_ |
| 6 #define CHROME_RENDERER_MEDIA_CAST_IPC_DISPATCHER_H_ | 6 #define CHROME_RENDERER_MEDIA_CAST_IPC_DISPATCHER_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 explicit CastIPCDispatcher( | 26 explicit CastIPCDispatcher( |
| 27 const scoped_refptr<base::SingleThreadTaskRunner>& io_task_runner); | 27 const scoped_refptr<base::SingleThreadTaskRunner>& io_task_runner); |
| 28 | 28 |
| 29 static CastIPCDispatcher* Get(); | 29 static CastIPCDispatcher* Get(); |
| 30 void Send(IPC::Message* message); | 30 void Send(IPC::Message* message); |
| 31 int32_t AddSender(CastTransportIPC* sender); | 31 int32_t AddSender(CastTransportIPC* sender); |
| 32 void RemoveSender(int32_t channel_id); | 32 void RemoveSender(int32_t channel_id); |
| 33 | 33 |
| 34 // IPC::MessageFilter implementation | 34 // IPC::MessageFilter implementation |
| 35 bool OnMessageReceived(const IPC::Message& message) override; | 35 bool OnMessageReceived(const IPC::Message& message) override; |
| 36 void OnFilterAdded(IPC::Sender* sender) override; | 36 void OnFilterAdded(IPC::Channel* channel) override; |
| 37 void OnFilterRemoved() override; | 37 void OnFilterRemoved() override; |
| 38 void OnChannelClosing() override; | 38 void OnChannelClosing() override; |
| 39 | 39 |
| 40 protected: | 40 protected: |
| 41 ~CastIPCDispatcher() override; | 41 ~CastIPCDispatcher() override; |
| 42 | 42 |
| 43 private: | 43 private: |
| 44 void OnNotifyStatusChange(int32_t channel_id, | 44 void OnNotifyStatusChange(int32_t channel_id, |
| 45 media::cast::CastTransportStatus status); | 45 media::cast::CastTransportStatus status); |
| 46 void OnRtpStatistics(int32_t channel_id, | 46 void OnRtpStatistics(int32_t channel_id, |
| (...skipping 19 matching lines...) Expand all Loading... |
| 66 // Task runner on which IPC calls are driven. | 66 // Task runner on which IPC calls are driven. |
| 67 const scoped_refptr<base::SingleThreadTaskRunner> io_task_runner_; | 67 const scoped_refptr<base::SingleThreadTaskRunner> io_task_runner_; |
| 68 | 68 |
| 69 // A map of stream ids to delegates; must only be accessed on | 69 // A map of stream ids to delegates; must only be accessed on |
| 70 // |io_message_loop_|. | 70 // |io_message_loop_|. |
| 71 IDMap<CastTransportIPC> id_map_; | 71 IDMap<CastTransportIPC> id_map_; |
| 72 DISALLOW_COPY_AND_ASSIGN(CastIPCDispatcher); | 72 DISALLOW_COPY_AND_ASSIGN(CastIPCDispatcher); |
| 73 }; | 73 }; |
| 74 | 74 |
| 75 #endif // CHROME_RENDERER_MEDIA_CAST_IPC_DISPATCHER_H_ | 75 #endif // CHROME_RENDERER_MEDIA_CAST_IPC_DISPATCHER_H_ |
| OLD | NEW |