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

Unified Diff: blimp/engine/mojo/blob_channel_service.cc

Issue 1985863002: Incorporate BlobChannel into Blimp image encode/decode pipeline. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@blobchannel-helium
Patch Set: fix gn dependency warning & rebase Created 4 years, 6 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 | « blimp/engine/mojo/blob_channel_service.h ('k') | blimp/engine/renderer/blimp_content_renderer_client.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: blimp/engine/mojo/blob_channel_service.cc
diff --git a/blimp/engine/mojo/blob_channel_service.cc b/blimp/engine/mojo/blob_channel_service.cc
index 42dfd389da53110d8e50447cb971323f34fbfe24..0234df60698b3a2c2628537b7e66cfd9ae44bfd9 100644
--- a/blimp/engine/mojo/blob_channel_service.cc
+++ b/blimp/engine/mojo/blob_channel_service.cc
@@ -4,29 +4,36 @@
#include "blimp/engine/mojo/blob_channel_service.h"
+#include "blimp/net/blob_channel/blob_channel_sender.h"
+
namespace blimp {
namespace engine {
-BlobChannelService::BlobChannelService(mojom::BlobChannelRequest request)
- : binding_(this, std::move(request)) {}
+BlobChannelService::BlobChannelService(BlobChannelSender* blob_channel_sender,
+ mojom::BlobChannelRequest request)
+ : binding_(this, std::move(request)),
+ blob_channel_sender_(blob_channel_sender) {
+ DCHECK(blob_channel_sender_);
+}
BlobChannelService::~BlobChannelService() {}
-void BlobChannelService::Put(const mojo::String& id,
- mojo::Array<uint8_t> data) {
- NOTIMPLEMENTED();
+void BlobChannelService::PutBlob(const mojo::String& id,
+ const mojo::String& data) {
+ blob_channel_sender_->PutBlob(id, new BlobData(data));
}
-void BlobChannelService::Push(const mojo::String& id) {
- NOTIMPLEMENTED();
+void BlobChannelService::DeliverBlob(const mojo::String& id) {
+ blob_channel_sender_->DeliverBlob(id);
}
// static
void BlobChannelService::Create(
+ BlobChannelSender* blob_channel_sender,
mojo::InterfaceRequest<mojom::BlobChannel> request) {
// Object lifetime is managed by BlobChannelService's StrongBinding
// |binding_|.
- new BlobChannelService(std::move(request));
+ new BlobChannelService(blob_channel_sender, std::move(request));
}
} // namespace engine
« no previous file with comments | « blimp/engine/mojo/blob_channel_service.h ('k') | blimp/engine/renderer/blimp_content_renderer_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698