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

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

Issue 2526953003: Add MediaGpuChannelManager::LookupChannel(). (Closed)
Patch Set: Document GetCommandBufferRouteId() better. 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
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..99bc50ecddb56622c2147efa958f0da99d26493d 100644
--- a/media/gpu/ipc/service/media_gpu_channel_manager.h
+++ b/media/gpu/ipc/service/media_gpu_channel_manager.h
@@ -12,6 +12,7 @@
#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"
@@ -34,10 +35,15 @@ class MediaGpuChannelManager
void RemoveChannel(int32_t client_id);
void DestroyAllChannels();
+ // TODO(sandersd): Should we expose the MediaGpuChannel instead?
+ GpuChannel* LookupChannel(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);
};

Powered by Google App Engine
This is Rietveld 408576698