OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 CONTENT_COMMON_GPU_MEDIA_MEDIA_SERVICE_H_ | 5 #ifndef CONTENT_COMMON_GPU_MEDIA_MEDIA_SERVICE_H_ |
6 #define CONTENT_COMMON_GPU_MEDIA_MEDIA_SERVICE_H_ | 6 #define CONTENT_COMMON_GPU_MEDIA_MEDIA_SERVICE_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include "base/containers/scoped_ptr_hash_map.h" | 10 #include "base/containers/scoped_ptr_hash_map.h" |
11 #include "base/macros.h" | 11 #include "base/macros.h" |
12 #include "ipc/ipc_listener.h" | 12 #include "ipc/ipc_listener.h" |
13 #include "ipc/ipc_sender.h" | 13 #include "ipc/ipc_sender.h" |
14 #include "media/video/video_decode_accelerator.h" | 14 #include "media/video/video_decode_accelerator.h" |
15 | 15 |
16 namespace gpu { | 16 namespace content { |
| 17 |
17 class GpuChannel; | 18 class GpuChannel; |
18 class GpuChannelManager; | 19 class GpuChannelManager; |
19 } | |
20 | |
21 namespace content { | |
22 | |
23 class MediaChannel; | 20 class MediaChannel; |
24 | 21 |
25 class MediaService { | 22 class MediaService { |
26 public: | 23 public: |
27 MediaService(gpu::GpuChannelManager* channel_manager); | 24 MediaService(GpuChannelManager* channel_manager); |
28 ~MediaService(); | 25 ~MediaService(); |
29 | 26 |
30 void AddChannel(int32_t client_id); | 27 void AddChannel(int32_t client_id); |
31 void RemoveChannel(int32_t client_id); | 28 void RemoveChannel(int32_t client_id); |
32 void DestroyAllChannels(); | 29 void DestroyAllChannels(); |
33 | 30 |
34 private: | 31 private: |
35 gpu::GpuChannelManager* const channel_manager_; | 32 GpuChannelManager* const channel_manager_; |
36 base::ScopedPtrHashMap<int32_t, scoped_ptr<MediaChannel>> media_channels_; | 33 base::ScopedPtrHashMap<int32_t, scoped_ptr<MediaChannel>> media_channels_; |
37 DISALLOW_COPY_AND_ASSIGN(MediaService); | 34 DISALLOW_COPY_AND_ASSIGN(MediaService); |
38 }; | 35 }; |
39 | 36 |
40 } // namespace content | 37 } // namespace content |
41 | 38 |
42 #endif // CONTENT_COMMON_GPU_MEDIA_MEDIA_SERVICE_H_ | 39 #endif // CONTENT_COMMON_GPU_MEDIA_MEDIA_SERVICE_H_ |
OLD | NEW |