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

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

Issue 2322843002: Propagate connection info to Blimp android UI. (Closed)
Patch Set: Minor fix. 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
Index: blimp/client/core/blimp_client_context_impl.h
diff --git a/blimp/client/core/blimp_client_context_impl.h b/blimp/client/core/blimp_client_context_impl.h
index 5df7ff90d45b988809019147063ecea99b42e488..768d61d02e61f3b855850c51783d67939090c018 100644
--- a/blimp/client/core/blimp_client_context_impl.h
+++ b/blimp/client/core/blimp_client_context_impl.h
@@ -15,8 +15,9 @@
#include "base/threading/thread.h"
#include "blimp/client/core/compositor/blob_image_serialization_processor.h"
#include "blimp/client/core/session/client_network_components.h"
+#include "blimp/client/core/session/connection_status.h"
#include "blimp/client/core/session/identity_source.h"
-#include "blimp/client/core/session/network_event_observer.h"
+#include "blimp/client/core/settings/blimp_settings_delegate.h"
#include "blimp/client/public/blimp_client_context.h"
#include "blimp/client/public/contents/blimp_contents.h"
#include "blimp/client/public/session/assignment.h"
@@ -41,8 +42,8 @@ class TabControlFeature;
// the blimp client.
class BlimpClientContextImpl
: public BlimpClientContext,
- public BlobImageSerializationProcessor::ErrorDelegate,
- public NetworkEventObserver {
+ public BlimpSettingsDelegate,
+ public BlobImageSerializationProcessor::ErrorDelegate {
public:
// The |io_thread_task_runner| must be the task runner to use for IO
// operations.
@@ -60,16 +61,14 @@ class BlimpClientContextImpl
gfx::NativeWindow window) override;
void Connect() override;
- // NetworkEventObserver implementation.
- void OnConnected() override;
- void OnDisconnected(int result) override;
-
protected:
// Returns the URL to use for connections to the assigner. Used to construct
// the AssignmentSource.
virtual GURL GetAssignerURL();
- IdentitySource* GetIdentitySource();
+ // BlimpSettingsDelegate implementation.
+ IdentitySource* GetIdentitySource() override;
+ ConnectionStatus* GetConnectionStatus() override;
private:
// Connect to assignment source with OAuth2 token to get an assignment.
@@ -126,6 +125,9 @@ class BlimpClientContextImpl
// Provide OAuth2 token and propagate account sign in states change.
std::unique_ptr<IdentitySource> identity_source_;
+ // Connection status to the engine.
+ ConnectionStatus connection_status_;
+
base::WeakPtrFactory<BlimpClientContextImpl> weak_factory_;
DISALLOW_COPY_AND_ASSIGN(BlimpClientContextImpl);

Powered by Google App Engine
This is Rietveld 408576698