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

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

Issue 2544113002: Example MojoVideoDecoder decoder using the command buffer.
Patch Set: 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 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 718b8b8f33395fa48d06428a948901d244ce0548..f38e6d448c022f85e6de7eae985dbd6185910993 100644
--- a/media/gpu/ipc/service/media_gpu_channel_manager.h
+++ b/media/gpu/ipc/service/media_gpu_channel_manager.h
@@ -11,6 +11,8 @@
#include "base/containers/scoped_ptr_hash_map.h"
#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"
@@ -24,7 +26,8 @@ namespace media {
class MediaGpuChannel;
-class MediaGpuChannelManager {
+class MediaGpuChannelManager
+ : public base::SupportsWeakPtr<MediaGpuChannelManager> {
public:
explicit MediaGpuChannelManager(gpu::GpuChannelManager* channel_manager);
~MediaGpuChannelManager();
@@ -33,10 +36,15 @@ class MediaGpuChannelManager {
void RemoveChannel(int32_t client_id);
void DestroyAllChannels();
+ // TODO(sandersd): Should we expose the MediaGpuChannel instead?
+ gpu::GpuChannel* LookupChannel(base::UnguessableToken channel_token);
+
private:
gpu::GpuChannelManager* const channel_manager_;
base::ScopedPtrHashMap<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