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

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

Issue 2600603002: Remove base::ScopedPtrHashMap from media/. (Closed)
Patch Set: rev Created 3 years, 12 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
« no previous file with comments | « media/gpu/ipc/service/media_gpu_channel_manager.h ('k') | no next file » | 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 #include "media/gpu/ipc/service/media_gpu_channel_manager.h" 5 #include "media/gpu/ipc/service/media_gpu_channel_manager.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <utility> 8 #include <utility>
9 9
10 #include "gpu/ipc/service/gpu_channel.h" 10 #include "gpu/ipc/service/gpu_channel.h"
(...skipping 11 matching lines...) Expand all
22 : channel_manager_(channel_manager) {} 22 : channel_manager_(channel_manager) {}
23 23
24 MediaGpuChannelManager::~MediaGpuChannelManager() {} 24 MediaGpuChannelManager::~MediaGpuChannelManager() {}
25 25
26 void MediaGpuChannelManager::AddChannel(int32_t client_id) { 26 void MediaGpuChannelManager::AddChannel(int32_t client_id) {
27 gpu::GpuChannel* gpu_channel = channel_manager_->LookupChannel(client_id); 27 gpu::GpuChannel* gpu_channel = channel_manager_->LookupChannel(client_id);
28 DCHECK(gpu_channel); 28 DCHECK(gpu_channel);
29 std::unique_ptr<MediaGpuChannel> media_gpu_channel( 29 std::unique_ptr<MediaGpuChannel> media_gpu_channel(
30 new MediaGpuChannel(gpu_channel)); 30 new MediaGpuChannel(gpu_channel));
31 gpu_channel->SetUnhandledMessageListener(media_gpu_channel.get()); 31 gpu_channel->SetUnhandledMessageListener(media_gpu_channel.get());
32 media_gpu_channels_.set(client_id, std::move(media_gpu_channel)); 32 media_gpu_channels_[client_id] = std::move(media_gpu_channel);
33 } 33 }
34 34
35 void MediaGpuChannelManager::RemoveChannel(int32_t client_id) { 35 void MediaGpuChannelManager::RemoveChannel(int32_t client_id) {
36 media_gpu_channels_.erase(client_id); 36 media_gpu_channels_.erase(client_id);
37 } 37 }
38 38
39 void MediaGpuChannelManager::DestroyAllChannels() { 39 void MediaGpuChannelManager::DestroyAllChannels() {
40 media_gpu_channels_.clear(); 40 media_gpu_channels_.clear();
41 } 41 }
42 42
43 } // namespace media 43 } // namespace media
OLDNEW
« no previous file with comments | « media/gpu/ipc/service/media_gpu_channel_manager.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698