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

Unified Diff: media/gpu/ipc/service/media_gpu_channel_manager.h

Issue 2526953003: Add MediaGpuChannelManager::LookupChannel(). (Closed)
Patch Set: Implement MockGpuVideoAcceleratorFactories::GetCommandBufferRouteId(). Created 3 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/gpu/ipc/service/media_gpu_channel.cc ('k') | media/gpu/ipc/service/media_gpu_channel_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/gpu/ipc/service/media_gpu_channel_manager.h
diff --git a/media/gpu/ipc/service/media_gpu_channel_manager.h b/media/gpu/ipc/service/media_gpu_channel_manager.h
index 01aa42e84bd0a8510b12a54f2b0729a5666ae618..8cc3f2ff4b7a236ebc298622ec0366ff43898620 100644
--- a/media/gpu/ipc/service/media_gpu_channel_manager.h
+++ b/media/gpu/ipc/service/media_gpu_channel_manager.h
@@ -12,11 +12,13 @@
#include "base/macros.h"
#include "base/memory/weak_ptr.h"
+#include "base/unguessable_token.h"
#include "ipc/ipc_listener.h"
#include "ipc/ipc_sender.h"
#include "media/video/video_decode_accelerator.h"
namespace gpu {
+class GpuChannel;
class GpuChannelManager;
}
@@ -34,10 +36,15 @@ class MediaGpuChannelManager
void RemoveChannel(int32_t client_id);
void DestroyAllChannels();
+ // TODO(sandersd): Should we expose the MediaGpuChannel instead?
+ gpu::GpuChannel* LookupChannel(const base::UnguessableToken& channel_token);
+
private:
gpu::GpuChannelManager* const channel_manager_;
std::unordered_map<int32_t, std::unique_ptr<MediaGpuChannel>>
media_gpu_channels_;
+ std::map<base::UnguessableToken, int32_t> token_to_channel_;
+ std::map<int32_t, base::UnguessableToken> channel_to_token_;
DISALLOW_COPY_AND_ASSIGN(MediaGpuChannelManager);
};
« no previous file with comments | « media/gpu/ipc/service/media_gpu_channel.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