| 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 #include <string> |
| 10 | 10 |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 | 29 |
| 30 class BlimpCompositorDependencies; | 30 class BlimpCompositorDependencies; |
| 31 class BlimpContentsManager; | 31 class BlimpContentsManager; |
| 32 class BlobChannelFeature; | 32 class BlobChannelFeature; |
| 33 class CompositorDependencies; | 33 class CompositorDependencies; |
| 34 class GeolocationFeature; | 34 class GeolocationFeature; |
| 35 class ImeFeature; | 35 class ImeFeature; |
| 36 class NavigationFeature; | 36 class NavigationFeature; |
| 37 class RenderWidgetFeature; | 37 class RenderWidgetFeature; |
| 38 class SettingsFeature; | 38 class SettingsFeature; |
| 39 class Settings; |
| 39 class TabControlFeature; | 40 class TabControlFeature; |
| 40 | 41 |
| 41 // BlimpClientContextImpl is the implementation of the main context-class for | 42 // BlimpClientContextImpl is the implementation of the main context-class for |
| 42 // the blimp client. | 43 // the blimp client. |
| 43 class BlimpClientContextImpl | 44 class BlimpClientContextImpl |
| 44 : public BlimpClientContext, | 45 : public BlimpClientContext, |
| 45 public BlimpSettingsDelegate, | 46 public BlimpSettingsDelegate, |
| 46 public BlobImageSerializationProcessor::ErrorDelegate { | 47 public BlobImageSerializationProcessor::ErrorDelegate { |
| 47 public: | 48 public: |
| 48 // The |io_thread_task_runner| must be the task runner to use for IO | 49 // The |io_thread_task_runner| must be the task runner to use for IO |
| 49 // operations. | 50 // operations. |
| 50 // The |file_thread_task_runner| must be the task runner to use for file | 51 // The |file_thread_task_runner| must be the task runner to use for file |
| 51 // operations. | 52 // operations. |
| 52 BlimpClientContextImpl( | 53 BlimpClientContextImpl( |
| 53 scoped_refptr<base::SingleThreadTaskRunner> io_thread_task_runner, | 54 scoped_refptr<base::SingleThreadTaskRunner> io_thread_task_runner, |
| 54 scoped_refptr<base::SingleThreadTaskRunner> file_thread_task_runner, | 55 scoped_refptr<base::SingleThreadTaskRunner> file_thread_task_runner, |
| 55 std::unique_ptr<CompositorDependencies> compositor_dependencies); | 56 std::unique_ptr<CompositorDependencies> compositor_dependencies, |
| 57 PrefService* local_state); |
| 56 ~BlimpClientContextImpl() override; | 58 ~BlimpClientContextImpl() override; |
| 57 | 59 |
| 58 // BlimpClientContext implementation. | 60 // BlimpClientContext implementation. |
| 59 void SetDelegate(BlimpClientContextDelegate* delegate) override; | 61 void SetDelegate(BlimpClientContextDelegate* delegate) override; |
| 60 std::unique_ptr<BlimpContents> CreateBlimpContents( | 62 std::unique_ptr<BlimpContents> CreateBlimpContents( |
| 61 gfx::NativeWindow window) override; | 63 gfx::NativeWindow window) override; |
| 62 void Connect() override; | 64 void Connect() override; |
| 63 void ConnectWithAssignment(const Assignment& assignment) override; | 65 void ConnectWithAssignment(const Assignment& assignment) override; |
| 64 | 66 |
| 65 protected: | 67 protected: |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 std::unique_ptr<ClientNetworkComponents> net_components_; | 125 std::unique_ptr<ClientNetworkComponents> net_components_; |
| 124 | 126 |
| 125 std::unique_ptr<ThreadPipeManager> thread_pipe_manager_; | 127 std::unique_ptr<ThreadPipeManager> thread_pipe_manager_; |
| 126 | 128 |
| 127 // Provide OAuth2 token and propagate account sign in states change. | 129 // Provide OAuth2 token and propagate account sign in states change. |
| 128 std::unique_ptr<IdentitySource> identity_source_; | 130 std::unique_ptr<IdentitySource> identity_source_; |
| 129 | 131 |
| 130 // Connection status to the engine. | 132 // Connection status to the engine. |
| 131 ConnectionStatus connection_status_; | 133 ConnectionStatus connection_status_; |
| 132 | 134 |
| 135 // Through this settings are set and retrieved. |
| 136 std::unique_ptr<Settings> settings_; |
| 137 |
| 133 base::WeakPtrFactory<BlimpClientContextImpl> weak_factory_; | 138 base::WeakPtrFactory<BlimpClientContextImpl> weak_factory_; |
| 134 | 139 |
| 135 DISALLOW_COPY_AND_ASSIGN(BlimpClientContextImpl); | 140 DISALLOW_COPY_AND_ASSIGN(BlimpClientContextImpl); |
| 136 }; | 141 }; |
| 137 | 142 |
| 138 } // namespace client | 143 } // namespace client |
| 139 } // namespace blimp | 144 } // namespace blimp |
| 140 | 145 |
| 141 #endif // BLIMP_CLIENT_CORE_BLIMP_CLIENT_CONTEXT_IMPL_H_ | 146 #endif // BLIMP_CLIENT_CORE_BLIMP_CLIENT_CONTEXT_IMPL_H_ |
| OLD | NEW |