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

Side by Side 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 unified diff | Download patch
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 "blimp/engine/mojo/blob_channel_service.h" 5 #include "blimp/engine/mojo/blob_channel_service.h"
6 6
7 #include "blimp/net/blob_channel/blob_channel_sender.h"
8
7 namespace blimp { 9 namespace blimp {
8 namespace engine { 10 namespace engine {
9 11
10 BlobChannelService::BlobChannelService(mojom::BlobChannelRequest request) 12 BlobChannelService::BlobChannelService(BlobChannelSender* blob_channel_sender,
11 : binding_(this, std::move(request)) {} 13 mojom::BlobChannelRequest request)
14 : binding_(this, std::move(request)),
15 blob_channel_sender_(blob_channel_sender) {
16 DCHECK(blob_channel_sender_);
17 }
12 18
13 BlobChannelService::~BlobChannelService() {} 19 BlobChannelService::~BlobChannelService() {}
14 20
15 void BlobChannelService::Put(const mojo::String& id, 21 void BlobChannelService::PutBlob(const mojo::String& id,
16 mojo::Array<uint8_t> data) { 22 const mojo::String& data) {
17 NOTIMPLEMENTED(); 23 blob_channel_sender_->PutBlob(id, new BlobData(data));
18 } 24 }
19 25
20 void BlobChannelService::Push(const mojo::String& id) { 26 void BlobChannelService::DeliverBlob(const mojo::String& id) {
21 NOTIMPLEMENTED(); 27 blob_channel_sender_->DeliverBlob(id);
22 } 28 }
23 29
24 // static 30 // static
25 void BlobChannelService::Create( 31 void BlobChannelService::Create(
32 BlobChannelSender* blob_channel_sender,
26 mojo::InterfaceRequest<mojom::BlobChannel> request) { 33 mojo::InterfaceRequest<mojom::BlobChannel> request) {
27 // Object lifetime is managed by BlobChannelService's StrongBinding 34 // Object lifetime is managed by BlobChannelService's StrongBinding
28 // |binding_|. 35 // |binding_|.
29 new BlobChannelService(std::move(request)); 36 new BlobChannelService(blob_channel_sender, std::move(request));
30 } 37 }
31 38
32 } // namespace engine 39 } // namespace engine
33 } // namespace blimp 40 } // namespace blimp
OLDNEW
« 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