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> | |
nyquist
2016/09/01 00:34:30
thanks!
| |
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 #include "device/geolocation/geolocation_delegate.h" | |
nyquist
2016/09/01 00:34:30
can this be forward declared?
CJ
2016/09/01 00:45:40
Done.
| |
22 #include "url/gurl.h" | 24 #include "url/gurl.h" |
23 | 25 |
24 namespace blimp { | 26 namespace blimp { |
25 namespace client { | 27 namespace client { |
26 | 28 |
27 class BlimpCompositorDependencies; | 29 class BlimpCompositorDependencies; |
28 class BlimpContentsManager; | 30 class BlimpContentsManager; |
29 class CompositorDependencies; | 31 class CompositorDependencies; |
32 class GeolocationFeature; | |
30 class ImeFeature; | 33 class ImeFeature; |
31 class NavigationFeature; | 34 class NavigationFeature; |
32 class RenderWidgetFeature; | 35 class RenderWidgetFeature; |
33 class SettingsFeature; | 36 class SettingsFeature; |
34 class TabControlFeature; | 37 class TabControlFeature; |
35 | 38 |
36 // BlimpClientContextImpl is the implementation of the main context-class for | 39 // BlimpClientContextImpl is the implementation of the main context-class for |
37 // the blimp client. | 40 // the blimp client. |
38 class BlimpClientContextImpl : public BlimpClientContext, | 41 class BlimpClientContextImpl : public BlimpClientContext, |
39 public NetworkEventObserver { | 42 public NetworkEventObserver { |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
92 // The task runner to use for file operations. | 95 // The task runner to use for file operations. |
93 scoped_refptr<base::SingleThreadTaskRunner> file_thread_task_runner_; | 96 scoped_refptr<base::SingleThreadTaskRunner> file_thread_task_runner_; |
94 | 97 |
95 // The AssignmentSource is used when the user of BlimpClientContextImpl calls | 98 // The AssignmentSource is used when the user of BlimpClientContextImpl calls |
96 // Connect() to get a valid assignment and later connect to the engine. | 99 // Connect() to get a valid assignment and later connect to the engine. |
97 std::unique_ptr<AssignmentSource> assignment_source_; | 100 std::unique_ptr<AssignmentSource> assignment_source_; |
98 | 101 |
99 // A set of dependencies required by all BlimpCompositor instances. | 102 // A set of dependencies required by all BlimpCompositor instances. |
100 std::unique_ptr<BlimpCompositorDependencies> blimp_compositor_dependencies_; | 103 std::unique_ptr<BlimpCompositorDependencies> blimp_compositor_dependencies_; |
101 | 104 |
105 std::unique_ptr<device::GeolocationDelegate> geolocation_delegate_; | |
nyquist
2016/09/01 00:34:30
Could you have a quick comment here as to what thi
CJ
2016/09/01 00:45:40
Done.
| |
106 | |
102 // Features to handle all incoming and outgoing protobuf messages. | 107 // Features to handle all incoming and outgoing protobuf messages. |
108 std::unique_ptr<GeolocationFeature> geolocation_feature_; | |
103 std::unique_ptr<ImeFeature> ime_feature_; | 109 std::unique_ptr<ImeFeature> ime_feature_; |
104 std::unique_ptr<NavigationFeature> navigation_feature_; | 110 std::unique_ptr<NavigationFeature> navigation_feature_; |
105 std::unique_ptr<RenderWidgetFeature> render_widget_feature_; | 111 std::unique_ptr<RenderWidgetFeature> render_widget_feature_; |
106 std::unique_ptr<SettingsFeature> settings_feature_; | 112 std::unique_ptr<SettingsFeature> settings_feature_; |
107 std::unique_ptr<TabControlFeature> tab_control_feature_; | 113 std::unique_ptr<TabControlFeature> tab_control_feature_; |
108 | 114 |
109 std::unique_ptr<BlimpContentsManager> blimp_contents_manager_; | 115 std::unique_ptr<BlimpContentsManager> blimp_contents_manager_; |
110 | 116 |
111 // Container struct for network components. | 117 // Container struct for network components. |
112 // Must be deleted on the IO thread. | 118 // Must be deleted on the IO thread. |
113 std::unique_ptr<ClientNetworkComponents> net_components_; | 119 std::unique_ptr<ClientNetworkComponents> net_components_; |
114 | 120 |
115 std::unique_ptr<ThreadPipeManager> thread_pipe_manager_; | 121 std::unique_ptr<ThreadPipeManager> thread_pipe_manager_; |
116 | 122 |
117 // Provide OAuth2 token and propagate account sign in states change. | 123 // Provide OAuth2 token and propagate account sign in states change. |
118 std::unique_ptr<IdentitySource> identity_source_; | 124 std::unique_ptr<IdentitySource> identity_source_; |
119 | 125 |
120 base::WeakPtrFactory<BlimpClientContextImpl> weak_factory_; | 126 base::WeakPtrFactory<BlimpClientContextImpl> weak_factory_; |
121 | 127 |
122 DISALLOW_COPY_AND_ASSIGN(BlimpClientContextImpl); | 128 DISALLOW_COPY_AND_ASSIGN(BlimpClientContextImpl); |
123 }; | 129 }; |
124 | 130 |
125 } // namespace client | 131 } // namespace client |
126 } // namespace blimp | 132 } // namespace blimp |
127 | 133 |
128 #endif // BLIMP_CLIENT_CORE_BLIMP_CLIENT_CONTEXT_IMPL_H_ | 134 #endif // BLIMP_CLIENT_CORE_BLIMP_CLIENT_CONTEXT_IMPL_H_ |
OLD | NEW |