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

Unified Diff: blimp/client/core/compositor/blob_channel_feature.h

Issue 2300493002: Move glue code of blob channel to blimp_client_context_impl. (Closed)
Patch Set: Merge conflicts. Created 4 years, 3 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/client/core/compositor/BUILD.gn ('k') | blimp/client/core/compositor/blob_channel_feature.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: blimp/client/core/compositor/blob_channel_feature.h
diff --git a/blimp/client/core/compositor/blob_channel_feature.h b/blimp/client/core/compositor/blob_channel_feature.h
new file mode 100644
index 0000000000000000000000000000000000000000..9b9a881d9ccd6286d12295e24a55ff7d29e1d0ef
--- /dev/null
+++ b/blimp/client/core/compositor/blob_channel_feature.h
@@ -0,0 +1,52 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef BLIMP_CLIENT_CORE_COMPOSITOR_BLOB_CHANNEL_FEATURE_H_
+#define BLIMP_CLIENT_CORE_COMPOSITOR_BLOB_CHANNEL_FEATURE_H_
+
+#include <memory>
+
+#include "base/macros.h"
+#include "blimp/client/core/compositor/blob_image_serialization_processor.h"
+#include "blimp/client/core/compositor/decoding_image_generator.h"
+#include "blimp/net/blimp_message_processor.h"
+
+namespace blimp {
+
+class BlobChannelReceiver;
+
+namespace client {
+
+// BlobChannelFeature processes incoming BlobChannel message from the engine and
+// holds the cache of Blob payloads.
+class BlobChannelFeature : public BlimpMessageProcessor {
+ public:
+ explicit BlobChannelFeature(
+ BlobImageSerializationProcessor::ErrorDelegate* delegate);
+ ~BlobChannelFeature() override;
+
+ protected:
+ // The receiver that does the actual blob processing, protected for test.
+ std::unique_ptr<BlobChannelReceiver> blob_receiver_;
+
+ private:
+ // BlimpMessageProcessor implementation.
+ void ProcessMessage(std::unique_ptr<BlimpMessage> message,
+ const net::CompletionCallback& callback) override;
+
+ // Receives blob BlimpMessages and relays blob data to BlobChannelReceiver.
+ // Owned by BlobChannelReceiver, therefore stored as a raw pointer here.
+ BlimpMessageProcessor* incoming_msg_processor_ = nullptr;
+
+ // Retrieves and decodes image data from |blob_receiver_|. Must outlive
+ // |blob_receiver_|.
+ BlobImageSerializationProcessor blob_image_processor_;
+
+ DISALLOW_COPY_AND_ASSIGN(BlobChannelFeature);
+};
+
+} // namespace client
+} // namespace blimp
+
+#endif // BLIMP_CLIENT_CORE_COMPOSITOR_BLOB_CHANNEL_FEATURE_H_
« no previous file with comments | « blimp/client/core/compositor/BUILD.gn ('k') | blimp/client/core/compositor/blob_channel_feature.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698