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

Side by Side Diff: media/gpu/ipc/service/media_gpu_channel_manager.h

Issue 2600603002: Remove base::ScopedPtrHashMap from media/. (Closed)
Patch Set: rev Created 4 years 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 | « media/cdm/aes_decryptor.cc ('k') | media/gpu/ipc/service/media_gpu_channel_manager.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 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 MEDIA_GPU_IPC_SERVICE_MEDIA_GPU_CHANNEL_MANAGER_H_ 5 #ifndef MEDIA_GPU_IPC_SERVICE_MEDIA_GPU_CHANNEL_MANAGER_H_
6 #define MEDIA_GPU_IPC_SERVICE_MEDIA_GPU_CHANNEL_MANAGER_H_ 6 #define MEDIA_GPU_IPC_SERVICE_MEDIA_GPU_CHANNEL_MANAGER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
11 #include <unordered_map>
11 12
12 #include "base/containers/scoped_ptr_hash_map.h"
13 #include "base/macros.h" 13 #include "base/macros.h"
14 #include "base/memory/weak_ptr.h" 14 #include "base/memory/weak_ptr.h"
15 #include "ipc/ipc_listener.h" 15 #include "ipc/ipc_listener.h"
16 #include "ipc/ipc_sender.h" 16 #include "ipc/ipc_sender.h"
17 #include "media/video/video_decode_accelerator.h" 17 #include "media/video/video_decode_accelerator.h"
18 18
19 namespace gpu { 19 namespace gpu {
20 class GpuChannelManager; 20 class GpuChannelManager;
21 } 21 }
22 22
23 namespace media { 23 namespace media {
24 24
25 class MediaGpuChannel; 25 class MediaGpuChannel;
26 26
27 class MediaGpuChannelManager 27 class MediaGpuChannelManager
28 : public base::SupportsWeakPtr<MediaGpuChannelManager> { 28 : public base::SupportsWeakPtr<MediaGpuChannelManager> {
29 public: 29 public:
30 explicit MediaGpuChannelManager(gpu::GpuChannelManager* channel_manager); 30 explicit MediaGpuChannelManager(gpu::GpuChannelManager* channel_manager);
31 ~MediaGpuChannelManager(); 31 ~MediaGpuChannelManager();
32 32
33 void AddChannel(int32_t client_id); 33 void AddChannel(int32_t client_id);
34 void RemoveChannel(int32_t client_id); 34 void RemoveChannel(int32_t client_id);
35 void DestroyAllChannels(); 35 void DestroyAllChannels();
36 36
37 private: 37 private:
38 gpu::GpuChannelManager* const channel_manager_; 38 gpu::GpuChannelManager* const channel_manager_;
39 base::ScopedPtrHashMap<int32_t, std::unique_ptr<MediaGpuChannel>> 39 std::unordered_map<int32_t, std::unique_ptr<MediaGpuChannel>>
40 media_gpu_channels_; 40 media_gpu_channels_;
41 DISALLOW_COPY_AND_ASSIGN(MediaGpuChannelManager); 41 DISALLOW_COPY_AND_ASSIGN(MediaGpuChannelManager);
42 }; 42 };
43 43
44 } // namespace media 44 } // namespace media
45 45
46 #endif // MEDIA_GPU_IPC_SERVICE_MEDIA_GPU_CHANNEL_MANAGER_H_ 46 #endif // MEDIA_GPU_IPC_SERVICE_MEDIA_GPU_CHANNEL_MANAGER_H_
OLDNEW
« no previous file with comments | « media/cdm/aes_decryptor.cc ('k') | media/gpu/ipc/service/media_gpu_channel_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698