Index: blimp/client/session/blimp_client_session.h |
diff --git a/blimp/client/session/blimp_client_session.h b/blimp/client/session/blimp_client_session.h |
index 71b4d3d0cf6b953ea465672811788d050b10311a..8cb6dd230cc8690f84b0ec7b47f102139586f457 100644 |
--- a/blimp/client/session/blimp_client_session.h |
+++ b/blimp/client/session/blimp_client_session.h |
@@ -13,6 +13,7 @@ |
#include "base/threading/thread.h" |
#include "blimp/client/session/assignment_source.h" |
#include "blimp/common/proto/blimp_message.pb.h" |
+#include "blimp/net/blimp_connection_details.h" |
#include "blimp/net/blimp_message_processor.h" |
namespace net { |
@@ -53,7 +54,8 @@ class NetworkEventObserver { |
// This session glues together the feature proxy components and the network |
// layer. The network components must be interacted with on the IO thread. The |
// feature proxies must be interacted with on the UI thread. |
-class BlimpClientSession : public NetworkEventObserver { |
+class BlimpClientSession : public NetworkEventObserver, |
+ public NetworkActivityObserver { |
public: |
explicit BlimpClientSession(const GURL& assigner_endpoint); |
@@ -70,6 +72,8 @@ class BlimpClientSession : public NetworkEventObserver { |
RenderWidgetFeature* GetRenderWidgetFeature() const; |
SettingsFeature* GetSettingsFeature() const; |
+ BlimpConnectionDetails* GetBlimpConnectionDetails() const; |
+ |
// The AssignmentCallback for when an assignment is ready. This will trigger |
// a connection to the engine. |
virtual void ConnectWithAssignment(AssignmentSource::Result result, |
@@ -82,10 +86,14 @@ class BlimpClientSession : public NetworkEventObserver { |
// assignment request. |
virtual void OnAssignmentConnectionAttempted(AssignmentSource::Result result, |
const Assignment& assignment); |
+ void EnableDebugInfo(bool enable); |
private: |
void RegisterFeatures(); |
+ // NetworkActivityObserver implementation. |
+ void UpdateDebugInfo(int received, int sent, int commits) override; |
+ |
// NetworkEventObserver implementation. |
void OnConnected() override; |
void OnDisconnected(int result) override; |
@@ -101,6 +109,10 @@ class BlimpClientSession : public NetworkEventObserver { |
// Connect() to get a valid assignment and later connect to the engine. |
std::unique_ptr<AssignmentSource> assignment_source_; |
+ // Collects details of network, such as number of commits and bytes |
+ // transferred over network. |
+ std::unique_ptr<BlimpConnectionDetails> blimp_connection_details_; |
+ |
// Container struct for network components. |
// Must be deleted on the IO thread. |
std::unique_ptr<ClientNetworkComponents> net_components_; |