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

Unified Diff: blimp/client/core/blimp_client_context_impl.cc

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/blimp_client_context_impl.h ('k') | blimp/client/core/compositor/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: blimp/client/core/blimp_client_context_impl.cc
diff --git a/blimp/client/core/blimp_client_context_impl.cc b/blimp/client/core/blimp_client_context_impl.cc
index ce457d8715ae465e155bd0edadbc938d1fd36783..03e447668e88505c94d75d2cb33e080dafa1f93f 100644
--- a/blimp/client/core/blimp_client_context_impl.cc
+++ b/blimp/client/core/blimp_client_context_impl.cc
@@ -13,6 +13,7 @@
#include "base/threading/sequenced_task_runner_handle.h"
#include "blimp/client/core/blimp_client_switches.h"
#include "blimp/client/core/compositor/blimp_compositor_dependencies.h"
+#include "blimp/client/core/compositor/blob_channel_feature.h"
#include "blimp/client/core/contents/blimp_contents_impl.h"
#include "blimp/client/core/contents/blimp_contents_manager.h"
#include "blimp/client/core/contents/ime_feature.h"
@@ -70,6 +71,7 @@ BlimpClientContextImpl::BlimpClientContextImpl(
blimp_compositor_dependencies_(
base::MakeUnique<BlimpCompositorDependencies>(
std::move(compositor_dependencies))),
+ blob_channel_feature_(new BlobChannelFeature(this)),
geolocation_feature_(base::MakeUnique<GeolocationFeature>(
base::MakeUnique<device::LocationArbitrator>(
base::MakeUnique<device::GeolocationDelegate>()))),
@@ -178,6 +180,8 @@ void BlimpClientContextImpl::ConnectWithAssignment(
void BlimpClientContextImpl::RegisterFeatures() {
// Register features' message senders and receivers.
+ thread_pipe_manager_->RegisterFeature(BlimpMessage::kBlobChannel,
+ blob_channel_feature_.get());
geolocation_feature_->set_outgoing_message_processor(
thread_pipe_manager_->RegisterFeature(BlimpMessage::kGeolocation,
geolocation_feature_.get()));
@@ -215,5 +219,14 @@ void BlimpClientContextImpl::CreateIdentitySource() {
base::Unretained(this)));
}
+void BlimpClientContextImpl::OnImageDecodeError() {
+ // Currently we just drop the connection on image decoding error.
+ io_thread_task_runner_->PostTask(
+ FROM_HERE,
+ base::Bind(
+ &BrowserConnectionHandler::DropCurrentConnection,
+ base::Unretained(net_components_->GetBrowserConnectionHandler())));
+}
+
} // namespace client
} // namespace blimp
« no previous file with comments | « blimp/client/core/blimp_client_context_impl.h ('k') | blimp/client/core/compositor/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698