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

Side by Side Diff: blimp/client/core/context/blimp_client_context_impl.h

Issue 2349073002: Blimp Settings framework on the c++ side (Closed)
Patch Set: nits and sync to head Created 4 years, 1 month 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 unified diff | Download patch
OLDNEW
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_CONTEXT_BLIMP_CLIENT_CONTEXT_IMPL_H_ 5 #ifndef BLIMP_CLIENT_CORE_CONTEXT_BLIMP_CLIENT_CONTEXT_IMPL_H_
6 #define BLIMP_CLIENT_CORE_CONTEXT_BLIMP_CLIENT_CONTEXT_IMPL_H_ 6 #define BLIMP_CLIENT_CORE_CONTEXT_BLIMP_CLIENT_CONTEXT_IMPL_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 #include <unordered_map> 10 #include <unordered_map>
(...skipping 19 matching lines...) Expand all
30 30
31 class BlimpCompositorDependencies; 31 class BlimpCompositorDependencies;
32 class BlimpContentsManager; 32 class BlimpContentsManager;
33 class BlobChannelFeature; 33 class BlobChannelFeature;
34 class CompositorDependencies; 34 class CompositorDependencies;
35 class GeolocationFeature; 35 class GeolocationFeature;
36 class ImeFeature; 36 class ImeFeature;
37 class NavigationFeature; 37 class NavigationFeature;
38 class RenderWidgetFeature; 38 class RenderWidgetFeature;
39 class SettingsFeature; 39 class SettingsFeature;
40 class Settings;
40 class TabControlFeature; 41 class TabControlFeature;
41 42
42 // BlimpClientContextImpl is the implementation of the main context-class for 43 // BlimpClientContextImpl is the implementation of the main context-class for
43 // the blimp client. 44 // the blimp client.
44 class BlimpClientContextImpl 45 class BlimpClientContextImpl
45 : public BlimpClientContext, 46 : public BlimpClientContext,
46 public BlimpSettingsDelegate, 47 public BlimpSettingsDelegate,
47 public BlobImageSerializationProcessor::ErrorDelegate, 48 public BlobImageSerializationProcessor::ErrorDelegate,
48 public NetworkEventObserver { 49 public NetworkEventObserver {
49 public: 50 public:
50 // The |io_thread_task_runner| must be the task runner to use for IO 51 // The |io_thread_task_runner| must be the task runner to use for IO
51 // operations. 52 // operations.
52 // The |file_thread_task_runner| must be the task runner to use for file 53 // The |file_thread_task_runner| must be the task runner to use for file
53 // operations. 54 // operations.
54 BlimpClientContextImpl( 55 BlimpClientContextImpl(
55 scoped_refptr<base::SingleThreadTaskRunner> io_thread_task_runner, 56 scoped_refptr<base::SingleThreadTaskRunner> io_thread_task_runner,
56 scoped_refptr<base::SingleThreadTaskRunner> file_thread_task_runner, 57 scoped_refptr<base::SingleThreadTaskRunner> file_thread_task_runner,
57 std::unique_ptr<CompositorDependencies> compositor_dependencies); 58 std::unique_ptr<CompositorDependencies> compositor_dependencies,
59 PrefService* local_state);
58 ~BlimpClientContextImpl() override; 60 ~BlimpClientContextImpl() override;
59 61
60 // BlimpClientContext implementation. 62 // BlimpClientContext implementation.
61 void SetDelegate(BlimpClientContextDelegate* delegate) override; 63 void SetDelegate(BlimpClientContextDelegate* delegate) override;
62 std::unique_ptr<BlimpContents> CreateBlimpContents( 64 std::unique_ptr<BlimpContents> CreateBlimpContents(
63 gfx::NativeWindow window) override; 65 gfx::NativeWindow window) override;
64 void Connect() override; 66 void Connect() override;
65 void ConnectWithAssignment(const Assignment& assignment) override; 67 void ConnectWithAssignment(const Assignment& assignment) override;
66 68
67 // Creates a data object containing data about Blimp to be used for feedback. 69 // Creates a data object containing data about Blimp to be used for feedback.
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 103
102 // The task runner to use for IO operations. 104 // The task runner to use for IO operations.
103 scoped_refptr<base::SingleThreadTaskRunner> io_thread_task_runner_; 105 scoped_refptr<base::SingleThreadTaskRunner> io_thread_task_runner_;
104 106
105 // The task runner to use for file operations. 107 // The task runner to use for file operations.
106 scoped_refptr<base::SingleThreadTaskRunner> file_thread_task_runner_; 108 scoped_refptr<base::SingleThreadTaskRunner> file_thread_task_runner_;
107 109
108 // A set of dependencies required by all BlimpCompositor instances. 110 // A set of dependencies required by all BlimpCompositor instances.
109 std::unique_ptr<BlimpCompositorDependencies> blimp_compositor_dependencies_; 111 std::unique_ptr<BlimpCompositorDependencies> blimp_compositor_dependencies_;
110 112
113 // Through this settings are set and retrieved. This should be initialized
114 // before settings_feature_.
115 std::unique_ptr<Settings> settings_;
116
111 // Features to handle all incoming and outgoing protobuf messages. 117 // Features to handle all incoming and outgoing protobuf messages.
112 std::unique_ptr<BlobChannelFeature> blob_channel_feature_; 118 std::unique_ptr<BlobChannelFeature> blob_channel_feature_;
113 std::unique_ptr<GeolocationFeature> geolocation_feature_; 119 std::unique_ptr<GeolocationFeature> geolocation_feature_;
114 std::unique_ptr<ImeFeature> ime_feature_; 120 std::unique_ptr<ImeFeature> ime_feature_;
115 std::unique_ptr<NavigationFeature> navigation_feature_; 121 std::unique_ptr<NavigationFeature> navigation_feature_;
116 std::unique_ptr<RenderWidgetFeature> render_widget_feature_; 122 std::unique_ptr<RenderWidgetFeature> render_widget_feature_;
117 std::unique_ptr<SettingsFeature> settings_feature_; 123 std::unique_ptr<SettingsFeature> settings_feature_;
118 std::unique_ptr<TabControlFeature> tab_control_feature_; 124 std::unique_ptr<TabControlFeature> tab_control_feature_;
119 125
120 std::unique_ptr<BlimpContentsManager> blimp_contents_manager_; 126 std::unique_ptr<BlimpContentsManager> blimp_contents_manager_;
(...skipping 11 matching lines...) Expand all
132 138
133 base::WeakPtrFactory<BlimpClientContextImpl> weak_factory_; 139 base::WeakPtrFactory<BlimpClientContextImpl> weak_factory_;
134 140
135 DISALLOW_COPY_AND_ASSIGN(BlimpClientContextImpl); 141 DISALLOW_COPY_AND_ASSIGN(BlimpClientContextImpl);
136 }; 142 };
137 143
138 } // namespace client 144 } // namespace client
139 } // namespace blimp 145 } // namespace blimp
140 146
141 #endif // BLIMP_CLIENT_CORE_CONTEXT_BLIMP_CLIENT_CONTEXT_IMPL_H_ 147 #endif // BLIMP_CLIENT_CORE_CONTEXT_BLIMP_CLIENT_CONTEXT_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698