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

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

Issue 1687393002: Add assigner support to Blimp (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix evil build break? Created 4 years, 10 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
« no previous file with comments | « blimp/client/session/assignment_source_unittest.cc ('k') | blimp/client/session/blimp_client_session.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 afcfd5333608381a4493e7fa9b6dab51bbe91186..b715453c21a807bf5314af6fb55299b34eb08713 100644
--- a/blimp/client/session/blimp_client_session.h
+++ b/blimp/client/session/blimp_client_session.h
@@ -42,19 +42,31 @@ class TabControlFeature;
// feature proxies must be interacted with on the UI thread.
class BLIMP_CLIENT_EXPORT BlimpClientSession {
public:
- explicit BlimpClientSession(scoped_ptr<AssignmentSource> assignment_source);
+ BlimpClientSession();
// Uses the AssignmentSource to get an Assignment and then uses the assignment
// configuration to connect to the Blimplet.
- void Connect();
+ // |client_auth_token| is the OAuth2 access token to use when querying
+ // for an assignment. This token needs the OAuth2 scope of userinfo.email and
+ // only needs to be an access token, not a refresh token.
+ void Connect(const std::string& client_auth_token);
TabControlFeature* GetTabControlFeature() const;
NavigationFeature* GetNavigationFeature() const;
RenderWidgetFeature* GetRenderWidgetFeature() const;
+ // The AssignmentCallback for when an assignment is ready. This will trigger
+ // a connection to the engine.
+ virtual void ConnectWithAssignment(AssignmentSource::Result result,
+ const Assignment& assignment);
+
protected:
virtual ~BlimpClientSession();
+ // Notified every time the AssignmentSource returns the result of an attempted
+ // assignment request.
+ virtual void OnAssignmentConnectionAttempted(AssignmentSource::Result result);
+
private:
// Registers a message processor which will receive all messages of the |type|
// specified. Returns a BlimpMessageProcessor object for sending messages of
@@ -63,19 +75,15 @@ class BLIMP_CLIENT_EXPORT BlimpClientSession {
BlimpMessage::Type type,
BlimpMessageProcessor* incoming_processor);
- // The AssignmentCallback for when an assignment is ready. This will trigger
- // a connection to the engine.
- void ConnectWithAssignment(const Assignment& assignment);
-
- // The AssignmentSource is used when the user of BlimpClientSession calls
- // Connect() to get a valid assignment and later connect to the engine.
- scoped_ptr<AssignmentSource> assignment_source_;
-
base::Thread io_thread_;
scoped_ptr<TabControlFeature> tab_control_feature_;
scoped_ptr<NavigationFeature> navigation_feature_;
scoped_ptr<RenderWidgetFeature> render_widget_feature_;
+ // The AssignmentSource is used when the user of BlimpClientSession calls
+ // Connect() to get a valid assignment and later connect to the engine.
+ scoped_ptr<AssignmentSource> assignment_source_;
+
// Container struct for network components.
// Must be deleted on the IO thread.
scoped_ptr<ClientNetworkComponents> net_components_;
« no previous file with comments | « blimp/client/session/assignment_source_unittest.cc ('k') | blimp/client/session/blimp_client_session.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698