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

Unified Diff: blimp/client/session/blimp_client_session.cc

Issue 1810213009: blimp: Add settings to allow the client to download the whole page. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@record_full_document
Patch Set: Created 4 years, 9 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 226b625cd557d8fa7ae22dac71c2a18dc8b74920..7dc333f4780333dcc7dcd1fb1a032b0b0454d4dd 100644
--- a/blimp/client/session/blimp_client_session.cc
+++ b/blimp/client/session/blimp_client_session.cc
@@ -14,6 +14,7 @@
#include "blimp/client/app/blimp_client_switches.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/net/blimp_connection.h"
#include "blimp/net/blimp_message_processor.h"
@@ -150,6 +151,7 @@ BlimpClientSession::BlimpClientSession()
tab_control_feature_(new TabControlFeature),
navigation_feature_(new NavigationFeature),
render_widget_feature_(new RenderWidgetFeature),
+ settings_feature_(new SettingsFeature),
weak_factory_(this) {
net_components_.reset(new ClientNetworkComponents(
make_scoped_ptr(new CrossThreadNetworkEventObserver(
@@ -217,6 +219,13 @@ void BlimpClientSession::RegisterFeatures() {
render_widget_feature_->set_outgoing_compositor_message_processor(
thread_pipe_manager_->RegisterFeature(BlimpMessage::COMPOSITOR,
render_widget_feature_.get()));
+ settings_feature_->set_outgoing_message_processor(
+ thread_pipe_manager_->RegisterFeature(BlimpMessage::SETTINGS,
+ settings_feature_.get()));
+
+ if (base::CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kDownloadWholeDocument))
+ settings_feature_->SetRecordWholeDocument(true);
// Client will not send send any RenderWidget messages, so don't save the
// outgoing BlimpMessageProcessor in the RenderWidgetFeature.

Powered by Google App Engine
This is Rietveld 408576698