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

Unified Diff: blimp/client/session/blimp_client_session.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: Decoupled BlobChannelSenderHost from mojom::BlobChannel Created 4 years, 7 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
Index: blimp/client/session/blimp_client_session.cc
diff --git a/blimp/client/session/blimp_client_session.cc b/blimp/client/session/blimp_client_session.cc
index 6dbedcffcb8394b4ba2ebac082568d39d69d7c22..a7490b75a3d99c1dfb9528995a66cb3976c04a71 100644
--- a/blimp/client/session/blimp_client_session.cc
+++ b/blimp/client/session/blimp_client_session.cc
@@ -13,14 +13,18 @@
#include "base/thread_task_runner_handle.h"
#include "base/threading/sequenced_task_runner_handle.h"
#include "blimp/client/app/blimp_client_switches.h"
+#include "blimp/client/feature/compositor/client_image_serialization_processor.h"
Wez 2016/05/21 01:08:04 Non-wrapped line exceeds 80 chars? ESTYLEGEDDON
Kevin M 2016/05/27 22:35:30 Linter thinks it's cool; I don't think that rule a
Wez 2016/06/07 01:18:31 Yup, i think not.
#include "blimp/client/feature/ime_feature.h"
#include "blimp/client/feature/navigation_feature.h"
#include "blimp/client/feature/render_widget_feature.h"
#include "blimp/client/feature/settings_feature.h"
#include "blimp/client/feature/tab_control_feature.h"
+#include "blimp/common/blob_cache/in_memory_blob_cache.h"
#include "blimp/net/blimp_connection.h"
#include "blimp/net/blimp_message_processor.h"
#include "blimp/net/blimp_message_thread_pipe.h"
+#include "blimp/net/blob_channel/blob_channel_receiver.h"
+#include "blimp/net/blob_channel/helium_blob_receiver_delegate.h"
#include "blimp/net/browser_connection_handler.h"
#include "blimp/net/client_connection_manager.h"
#include "blimp/net/common.h"
@@ -160,6 +164,10 @@ void ClientNetworkComponents::OnConnectionError(int result) {
BlimpClientSession::BlimpClientSession(const GURL& assigner_endpoint)
: io_thread_("BlimpIOThread"),
+ blob_delegate_(new HeliumBlobReceiverDelegate),
+ blob_receiver_(
+ new BlobChannelReceiverImpl(base::WrapUnique(new InMemoryBlobCache),
+ base::WrapUnique(blob_delegate_))),
Wez 2016/05/21 01:08:04 Would be super duper awesome to avoid this gross p
Kevin M 2016/05/27 22:35:30 Done.
tab_control_feature_(new TabControlFeature),
navigation_feature_(new NavigationFeature),
ime_feature_(new ImeFeature),
@@ -179,6 +187,9 @@ BlimpClientSession::BlimpClientSession(const GURL& assigner_endpoint)
RegisterFeatures();
+ ClientImageSerializationProcessor::GetInstance()->set_blob_receiver(
+ blob_receiver_.get());
+
// Initialize must only be posted after the RegisterFeature calls have
// completed.
io_thread_.task_runner()->PostTask(
@@ -236,6 +247,8 @@ void BlimpClientSession::RegisterFeatures() {
settings_feature_->set_outgoing_message_processor(
thread_pipe_manager_->RegisterFeature(BlimpMessage::SETTINGS,
settings_feature_.get()));
+ thread_pipe_manager_->RegisterFeature(BlimpMessage::BLOB_CHANNEL,
+ blob_delegate_);
if (base::CommandLine::ForCurrentProcess()->HasSwitch(
switches::kDownloadWholeDocument))

Powered by Google App Engine
This is Rietveld 408576698