| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef BLIMP_CLIENT_CORE_BLIMP_CLIENT_CONTEXT_IMPL_H_ | 5 #ifndef BLIMP_CLIENT_CORE_BLIMP_CLIENT_CONTEXT_IMPL_H_ |
| 6 #define BLIMP_CLIENT_CORE_BLIMP_CLIENT_CONTEXT_IMPL_H_ | 6 #define BLIMP_CLIENT_CORE_BLIMP_CLIENT_CONTEXT_IMPL_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <string> |
| 9 | 10 |
| 10 #include "base/macros.h" | 11 #include "base/macros.h" |
| 11 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
| 12 #include "base/memory/weak_ptr.h" | 13 #include "base/memory/weak_ptr.h" |
| 13 #include "base/single_thread_task_runner.h" | 14 #include "base/single_thread_task_runner.h" |
| 14 #include "base/threading/thread.h" | 15 #include "base/threading/thread.h" |
| 15 #include "blimp/client/core/session/client_network_components.h" | 16 #include "blimp/client/core/session/client_network_components.h" |
| 16 #include "blimp/client/core/session/identity_source.h" | 17 #include "blimp/client/core/session/identity_source.h" |
| 17 #include "blimp/client/core/session/network_event_observer.h" | 18 #include "blimp/client/core/session/network_event_observer.h" |
| 18 #include "blimp/client/public/blimp_client_context.h" | 19 #include "blimp/client/public/blimp_client_context.h" |
| 19 #include "blimp/client/public/contents/blimp_contents.h" | 20 #include "blimp/client/public/contents/blimp_contents.h" |
| 20 #include "blimp/client/public/session/assignment.h" | 21 #include "blimp/client/public/session/assignment.h" |
| 21 #include "blimp/net/thread_pipe_manager.h" | 22 #include "blimp/net/thread_pipe_manager.h" |
| 23 |
| 22 #include "url/gurl.h" | 24 #include "url/gurl.h" |
| 23 | 25 |
| 26 namespace device { |
| 27 class GeolocationDelegate; |
| 28 } |
| 29 |
| 24 namespace blimp { | 30 namespace blimp { |
| 25 namespace client { | 31 namespace client { |
| 26 | 32 |
| 27 class BlimpCompositorDependencies; | 33 class BlimpCompositorDependencies; |
| 28 class BlimpContentsManager; | 34 class BlimpContentsManager; |
| 29 class CompositorDependencies; | 35 class CompositorDependencies; |
| 36 class GeolocationFeature; |
| 30 class ImeFeature; | 37 class ImeFeature; |
| 31 class NavigationFeature; | 38 class NavigationFeature; |
| 32 class RenderWidgetFeature; | 39 class RenderWidgetFeature; |
| 33 class SettingsFeature; | 40 class SettingsFeature; |
| 34 class TabControlFeature; | 41 class TabControlFeature; |
| 35 | 42 |
| 36 // BlimpClientContextImpl is the implementation of the main context-class for | 43 // BlimpClientContextImpl is the implementation of the main context-class for |
| 37 // the blimp client. | 44 // the blimp client. |
| 38 class BlimpClientContextImpl : public BlimpClientContext, | 45 class BlimpClientContextImpl : public BlimpClientContext, |
| 39 public NetworkEventObserver { | 46 public NetworkEventObserver { |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 // The task runner to use for file operations. | 99 // The task runner to use for file operations. |
| 93 scoped_refptr<base::SingleThreadTaskRunner> file_thread_task_runner_; | 100 scoped_refptr<base::SingleThreadTaskRunner> file_thread_task_runner_; |
| 94 | 101 |
| 95 // The AssignmentSource is used when the user of BlimpClientContextImpl calls | 102 // The AssignmentSource is used when the user of BlimpClientContextImpl calls |
| 96 // Connect() to get a valid assignment and later connect to the engine. | 103 // Connect() to get a valid assignment and later connect to the engine. |
| 97 std::unique_ptr<AssignmentSource> assignment_source_; | 104 std::unique_ptr<AssignmentSource> assignment_source_; |
| 98 | 105 |
| 99 // A set of dependencies required by all BlimpCompositor instances. | 106 // A set of dependencies required by all BlimpCompositor instances. |
| 100 std::unique_ptr<BlimpCompositorDependencies> blimp_compositor_dependencies_; | 107 std::unique_ptr<BlimpCompositorDependencies> blimp_compositor_dependencies_; |
| 101 | 108 |
| 109 // Provides embedder specific functionality for Geolocation. |
| 110 std::unique_ptr<device::GeolocationDelegate> geolocation_delegate_; |
| 111 |
| 102 // Features to handle all incoming and outgoing protobuf messages. | 112 // Features to handle all incoming and outgoing protobuf messages. |
| 113 std::unique_ptr<GeolocationFeature> geolocation_feature_; |
| 103 std::unique_ptr<ImeFeature> ime_feature_; | 114 std::unique_ptr<ImeFeature> ime_feature_; |
| 104 std::unique_ptr<NavigationFeature> navigation_feature_; | 115 std::unique_ptr<NavigationFeature> navigation_feature_; |
| 105 std::unique_ptr<RenderWidgetFeature> render_widget_feature_; | 116 std::unique_ptr<RenderWidgetFeature> render_widget_feature_; |
| 106 std::unique_ptr<SettingsFeature> settings_feature_; | 117 std::unique_ptr<SettingsFeature> settings_feature_; |
| 107 std::unique_ptr<TabControlFeature> tab_control_feature_; | 118 std::unique_ptr<TabControlFeature> tab_control_feature_; |
| 108 | 119 |
| 109 std::unique_ptr<BlimpContentsManager> blimp_contents_manager_; | 120 std::unique_ptr<BlimpContentsManager> blimp_contents_manager_; |
| 110 | 121 |
| 111 // Container struct for network components. | 122 // Container struct for network components. |
| 112 // Must be deleted on the IO thread. | 123 // Must be deleted on the IO thread. |
| 113 std::unique_ptr<ClientNetworkComponents> net_components_; | 124 std::unique_ptr<ClientNetworkComponents> net_components_; |
| 114 | 125 |
| 115 std::unique_ptr<ThreadPipeManager> thread_pipe_manager_; | 126 std::unique_ptr<ThreadPipeManager> thread_pipe_manager_; |
| 116 | 127 |
| 117 // Provide OAuth2 token and propagate account sign in states change. | 128 // Provide OAuth2 token and propagate account sign in states change. |
| 118 std::unique_ptr<IdentitySource> identity_source_; | 129 std::unique_ptr<IdentitySource> identity_source_; |
| 119 | 130 |
| 120 base::WeakPtrFactory<BlimpClientContextImpl> weak_factory_; | 131 base::WeakPtrFactory<BlimpClientContextImpl> weak_factory_; |
| 121 | 132 |
| 122 DISALLOW_COPY_AND_ASSIGN(BlimpClientContextImpl); | 133 DISALLOW_COPY_AND_ASSIGN(BlimpClientContextImpl); |
| 123 }; | 134 }; |
| 124 | 135 |
| 125 } // namespace client | 136 } // namespace client |
| 126 } // namespace blimp | 137 } // namespace blimp |
| 127 | 138 |
| 128 #endif // BLIMP_CLIENT_CORE_BLIMP_CLIENT_CONTEXT_IMPL_H_ | 139 #endif // BLIMP_CLIENT_CORE_BLIMP_CLIENT_CONTEXT_IMPL_H_ |
| OLD | NEW |