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

Side by Side Diff: blimp/client/core/compositor/blob_channel_feature.cc

Issue 2624903006: Remove all blimp client code. (Closed)
Patch Set: Update buildbot configuration 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 unified diff | Download patch
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "blimp/client/core/compositor/blob_channel_feature.h"
6
7 #include "base/memory/ptr_util.h"
8 #include "blimp/common/blob_cache/in_memory_blob_cache.h"
9 #include "blimp/common/proto/blimp_message.pb.h"
10 #include "blimp/net/blob_channel/blob_channel_receiver.h"
11 #include "blimp/net/blob_channel/helium_blob_receiver_delegate.h"
12
13 namespace blimp {
14 namespace client {
15
16 BlobChannelFeature::BlobChannelFeature(
17 BlobImageSerializationProcessor::ErrorDelegate* delegate) {
18 std::unique_ptr<HeliumBlobReceiverDelegate> blob_delegate =
19 base::MakeUnique<HeliumBlobReceiverDelegate>();
20
21 // Set incoming blob message processor.
22 incoming_msg_processor_ = blob_delegate.get();
23
24 // Set BlobChannelReceiver that does the actual blob processing.
25 blob_receiver_ = BlobChannelReceiver::Create(
26 base::MakeUnique<InMemoryBlobCache>(), std::move(blob_delegate));
27 blob_image_processor_.set_blob_receiver(blob_receiver_.get());
28
29 // Set image decode error delegate.
30 DCHECK(delegate);
31 blob_image_processor_.set_error_delegate(delegate);
32 }
33
34 BlobChannelFeature::~BlobChannelFeature() = default;
35
36 void BlobChannelFeature::ProcessMessage(
37 std::unique_ptr<BlimpMessage> message,
38 const net::CompletionCallback& callback) {
39 DCHECK(incoming_msg_processor_);
40
41 // Forward the message to |incoming_msg_processor_|.
42 incoming_msg_processor_->ProcessMessage(std::move(message), callback);
43 }
44
45 } // namespace client
46 } // namespace blimp
OLDNEW
« no previous file with comments | « blimp/client/core/compositor/blob_channel_feature.h ('k') | blimp/client/core/compositor/blob_channel_feature_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698