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

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

Issue 2292723003: Move remaining Blimp feature code to core. (Closed)
Patch Set: Fixed gn check failure Created 4 years, 4 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 7c8d6e588929159df70e86cd3013473edda85b79..036a66c5b0f5a923d71c42f0730d3ee29e94bacc 100644
--- a/blimp/client/core/blimp_client_context_impl.h
+++ b/blimp/client/core/blimp_client_context_impl.h
@@ -7,6 +7,7 @@
#include <memory>
+#include "base/command_line.h"
Khushal 2016/08/31 04:30:47 Is the include needed?
David Trainor- moved to gerrit 2016/08/31 05:21:26 Oops meant to add it to the .cc file thanks
#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "base/memory/weak_ptr.h"
@@ -24,9 +25,13 @@
namespace blimp {
namespace client {
+class BlimpCompositorDependencies;
class BlimpContentsManager;
+class CompositorDependencies;
class ImeFeature;
class NavigationFeature;
+class RenderWidgetFeature;
+class SettingsFeature;
class TabControlFeature;
// BlimpClientContextImpl is the implementation of the main context-class for
@@ -40,7 +45,8 @@ class BlimpClientContextImpl : public BlimpClientContext,
// operations.
BlimpClientContextImpl(
scoped_refptr<base::SingleThreadTaskRunner> io_thread_task_runner,
- scoped_refptr<base::SingleThreadTaskRunner> file_thread_task_runner);
+ scoped_refptr<base::SingleThreadTaskRunner> file_thread_task_runner,
+ std::unique_ptr<CompositorDependencies> compositor_dependencies);
~BlimpClientContextImpl() override;
IdentitySource* GetIdentitySource();
@@ -61,13 +67,6 @@ class BlimpClientContextImpl : public BlimpClientContext,
// the AssignmentSource.
virtual GURL GetAssignerURL();
- // Create IdentitySource which provides user sign in states and OAuth2 token
- // service.
- void CreateIdentitySource();
-
- // Provide OAuth2 token and propagate account sign in states change.
- std::unique_ptr<IdentitySource> identity_source_;
-
private:
// Connect to assignment source with OAuth2 token to get an assignment.
virtual void ConnectToAssignmentSource(const std::string& client_auth_token);
@@ -78,6 +77,11 @@ class BlimpClientContextImpl : public BlimpClientContext,
const Assignment& assignment);
void RegisterFeatures();
+ void InitializeSettings();
+
+ // Create IdentitySource which provides user sign in states and OAuth2 token
+ // service.
+ void CreateIdentitySource();
// Provides functionality from the embedder.
BlimpClientContextDelegate* delegate_ = nullptr;
@@ -92,9 +96,15 @@ class BlimpClientContextImpl : public BlimpClientContext,
// Connect() to get a valid assignment and later connect to the engine.
std::unique_ptr<AssignmentSource> assignment_source_;
+ // A set of dependencies required by all BlimpCompositor instances. The
+ // |delegate_| provides the embedder dependencies to this class when set.
Khushal 2016/08/31 04:30:47 We just get it in the ctor. Don't need to ask the
David Trainor- moved to gerrit 2016/08/31 05:21:26 Done.
+ std::unique_ptr<BlimpCompositorDependencies> blimp_compositor_dependencies_;
+
// Features to handle all incoming and outgoing protobuf messages.
std::unique_ptr<ImeFeature> ime_feature_;
std::unique_ptr<NavigationFeature> navigation_feature_;
+ std::unique_ptr<RenderWidgetFeature> render_widget_feature_;
+ std::unique_ptr<SettingsFeature> settings_feature_;
std::unique_ptr<TabControlFeature> tab_control_feature_;
std::unique_ptr<BlimpContentsManager> blimp_contents_manager_;
@@ -105,6 +115,9 @@ class BlimpClientContextImpl : public BlimpClientContext,
std::unique_ptr<ThreadPipeManager> thread_pipe_manager_;
+ // Provide OAuth2 token and propagate account sign in states change.
+ std::unique_ptr<IdentitySource> identity_source_;
+
base::WeakPtrFactory<BlimpClientContextImpl> weak_factory_;
DISALLOW_COPY_AND_ASSIGN(BlimpClientContextImpl);

Powered by Google App Engine
This is Rietveld 408576698