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 b7973b265f507556b25b21d843a061f50087ebdc..8422fa47a13f680bc77d5e374b36969d45187cfe 100644 |
--- a/blimp/client/session/blimp_client_session.cc |
+++ b/blimp/client/session/blimp_client_session.cc |
@@ -8,14 +8,23 @@ |
#include "blimp/client/session/render_widget_feature.h" |
#include "blimp/client/session/tab_control_feature.h" |
#include "blimp/net/browser_connection_handler.h" |
+#include "blimp/net/client_connection_manager.h" |
namespace blimp { |
+namespace { |
+// TODO(kmarshall): Read token from config. |
+const char kDummyClientToken[] = "MyVoiceIsMyPassport"; |
+} // namespace |
BlimpClientSession::BlimpClientSession() |
: connection_handler_(new BrowserConnectionHandler), |
+ connection_manager_( |
+ new ClientConnectionManager(connection_handler_.get())), |
tab_control_feature_(new TabControlFeature), |
navigation_feature_(new NavigationFeature), |
render_widget_feature_(new RenderWidgetFeature) { |
+ connection_manager_->set_client_token(kDummyClientToken); |
+ |
// Connect the features with the network layer. |
tab_control_feature_->set_outgoing_message_processor( |
connection_handler_->RegisterFeature(BlimpMessage::TAB_CONTROL, |
@@ -49,4 +58,12 @@ RenderWidgetFeature* BlimpClientSession::GetRenderWidgetFeature() const { |
return render_widget_feature_.get(); |
} |
+ClientConnectionManager* BlimpClientSession::GetConnectionManager() const { |
+ return connection_manager_.get(); |
+} |
+ |
+void BlimpClientSession::Connect() { |
+ connection_manager_->Connect(); |
+} |
+ |
} // namespace blimp |