Chromium Code Reviews| Index: blimp/engine/session/blimp_engine_session.cc |
| diff --git a/blimp/engine/session/blimp_engine_session.cc b/blimp/engine/session/blimp_engine_session.cc |
| index 687171200ca5784fc0a45f2252dd50b5f1c81ea8..1db921477c2cc8870dc1d1c100dea1f7e8e58089 100644 |
| --- a/blimp/engine/session/blimp_engine_session.cc |
| +++ b/blimp/engine/session/blimp_engine_session.cc |
| @@ -12,6 +12,7 @@ |
| #include "base/strings/utf_string_conversions.h" |
| #include "base/thread_task_runner_handle.h" |
| #include "base/trace_event/trace_event.h" |
| +#include "blimp/common/blob_cache/in_memory_blob_cache.h" |
| #include "blimp/common/create_blimp_message.h" |
| #include "blimp/common/proto/tab_control.pb.h" |
| #include "blimp/engine/app/blimp_engine_config.h" |
| @@ -25,6 +26,8 @@ |
| #include "blimp/net/blimp_connection.h" |
| #include "blimp/net/blimp_message_multiplexer.h" |
| #include "blimp/net/blimp_message_thread_pipe.h" |
| +#include "blimp/net/blob_channel/blob_channel_sender.h" |
| +#include "blimp/net/blob_channel/helium_blob_sender_delegate.h" |
| #include "blimp/net/browser_connection_handler.h" |
| #include "blimp/net/common.h" |
| #include "blimp/net/engine_authentication_handler.h" |
| @@ -213,14 +216,18 @@ BlimpEngineSession::BlimpEngineSession( |
| settings_manager_(settings_manager), |
| settings_feature_(settings_manager_), |
| render_widget_feature_(settings_manager_), |
| + blob_delegate_(new HeliumBlobSenderDelegate), |
| + blob_sender_(base::WrapUnique( |
| + new BlobChannelSender(base::WrapUnique(new InMemoryBlobCache), |
| + base::WrapUnique(blob_delegate_)))), |
|
Wez
2016/05/21 01:08:05
Ick! Really not keen on this thing of passing owne
Kevin M
2016/05/27 22:35:31
Done.
Wez
2016/06/07 01:18:31
Looks like you're still doing the same thing, exce
|
| net_components_( |
| new EngineNetworkComponents(net_log, |
| QuitCurrentMessageLoopClosure())) { |
| DCHECK(engine_config_); |
| DCHECK(settings_manager_); |
| - screen_->UpdateDisplayScaleAndSize(kDefaultScaleFactor, |
| - gfx::Size(kDefaultDisplayWidth, |
| - kDefaultDisplayHeight)); |
| + screen_->UpdateDisplayScaleAndSize( |
| + kDefaultScaleFactor, |
| + gfx::Size(kDefaultDisplayWidth, kDefaultDisplayHeight)); |
| render_widget_feature_.SetDelegate(kDummyTabId, this); |
| } |
| @@ -308,6 +315,9 @@ void BlimpEngineSession::RegisterFeatures() { |
| render_widget_feature_.set_ime_message_sender( |
| thread_pipe_manager_->RegisterFeature(BlimpMessage::IME, |
| &render_widget_feature_)); |
| + blob_delegate_->set_outgoing_message_processor( |
| + thread_pipe_manager_->RegisterFeature(BlimpMessage::BLOB_CHANNEL, |
| + blob_delegate_)); |
| // The Settings feature does not need an outgoing message processor, since we |
| // don't send any messages to the client right now. |
| @@ -592,8 +602,8 @@ void BlimpEngineSession::NavigationStateChanged( |
| net::CompletionCallback()); |
| } |
| -void BlimpEngineSession::LoadProgressChanged( |
| - content::WebContents* source, double progress) { |
| +void BlimpEngineSession::LoadProgressChanged(content::WebContents* source, |
| + double progress) { |
| if (source != web_contents_.get()) |
| return; |