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

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: Remove OnRecordWholeDocumentChanged from SettingsObserver and SettingsFeature Created 4 years, 2 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 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: 49 public:
49 // The |io_thread_task_runner| must be the task runner to use for IO 50 // The |io_thread_task_runner| must be the task runner to use for IO
50 // operations. 51 // operations.
51 // The |file_thread_task_runner| must be the task runner to use for file 52 // The |file_thread_task_runner| must be the task runner to use for file
52 // operations. 53 // operations.
53 BlimpClientContextImpl( 54 BlimpClientContextImpl(
54 scoped_refptr<base::SingleThreadTaskRunner> io_thread_task_runner, 55 scoped_refptr<base::SingleThreadTaskRunner> io_thread_task_runner,
55 scoped_refptr<base::SingleThreadTaskRunner> file_thread_task_runner, 56 scoped_refptr<base::SingleThreadTaskRunner> file_thread_task_runner,
56 std::unique_ptr<CompositorDependencies> compositor_dependencies); 57 std::unique_ptr<CompositorDependencies> compositor_dependencies,
58 PrefService* local_state);
57 ~BlimpClientContextImpl() override; 59 ~BlimpClientContextImpl() override;
58 60
59 // BlimpClientContext implementation. 61 // BlimpClientContext implementation.
60 void SetDelegate(BlimpClientContextDelegate* delegate) override; 62 void SetDelegate(BlimpClientContextDelegate* delegate) override;
61 std::unique_ptr<BlimpContents> CreateBlimpContents( 63 std::unique_ptr<BlimpContents> CreateBlimpContents(
62 gfx::NativeWindow window) override; 64 gfx::NativeWindow window) override;
63 void Connect() override; 65 void Connect() override;
64 void ConnectWithAssignment(const Assignment& assignment) override; 66 void ConnectWithAssignment(const Assignment& assignment) override;
65 67
66 // Creates a data object containing data about Blimp to be used for feedback. 68 // Creates a data object containing data about Blimp to be used for feedback.
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 // The task runner to use for file operations. 110 // The task runner to use for file operations.
109 scoped_refptr<base::SingleThreadTaskRunner> file_thread_task_runner_; 111 scoped_refptr<base::SingleThreadTaskRunner> file_thread_task_runner_;
110 112
111 // The AssignmentSource is used when the user of BlimpClientContextImpl calls 113 // The AssignmentSource is used when the user of BlimpClientContextImpl calls
112 // Connect() to get a valid assignment and later connect to the engine. 114 // Connect() to get a valid assignment and later connect to the engine.
113 std::unique_ptr<AssignmentSource> assignment_source_; 115 std::unique_ptr<AssignmentSource> assignment_source_;
114 116
115 // A set of dependencies required by all BlimpCompositor instances. 117 // A set of dependencies required by all BlimpCompositor instances.
116 std::unique_ptr<BlimpCompositorDependencies> blimp_compositor_dependencies_; 118 std::unique_ptr<BlimpCompositorDependencies> blimp_compositor_dependencies_;
117 119
120 // Through this settings are set and retrieved. This should be initialized
121 // before settings_feature_.
122 std::unique_ptr<Settings> settings_;
123
118 // Features to handle all incoming and outgoing protobuf messages. 124 // Features to handle all incoming and outgoing protobuf messages.
119 std::unique_ptr<BlobChannelFeature> blob_channel_feature_; 125 std::unique_ptr<BlobChannelFeature> blob_channel_feature_;
120 std::unique_ptr<GeolocationFeature> geolocation_feature_; 126 std::unique_ptr<GeolocationFeature> geolocation_feature_;
121 std::unique_ptr<ImeFeature> ime_feature_; 127 std::unique_ptr<ImeFeature> ime_feature_;
122 std::unique_ptr<NavigationFeature> navigation_feature_; 128 std::unique_ptr<NavigationFeature> navigation_feature_;
123 std::unique_ptr<RenderWidgetFeature> render_widget_feature_; 129 std::unique_ptr<RenderWidgetFeature> render_widget_feature_;
124 std::unique_ptr<SettingsFeature> settings_feature_; 130 std::unique_ptr<SettingsFeature> settings_feature_;
125 std::unique_ptr<TabControlFeature> tab_control_feature_; 131 std::unique_ptr<TabControlFeature> tab_control_feature_;
126 132
127 std::unique_ptr<BlimpContentsManager> blimp_contents_manager_; 133 std::unique_ptr<BlimpContentsManager> blimp_contents_manager_;
(...skipping 12 matching lines...) Expand all
140 146
141 base::WeakPtrFactory<BlimpClientContextImpl> weak_factory_; 147 base::WeakPtrFactory<BlimpClientContextImpl> weak_factory_;
142 148
143 DISALLOW_COPY_AND_ASSIGN(BlimpClientContextImpl); 149 DISALLOW_COPY_AND_ASSIGN(BlimpClientContextImpl);
144 }; 150 };
145 151
146 } // namespace client 152 } // namespace client
147 } // namespace blimp 153 } // namespace blimp
148 154
149 #endif // BLIMP_CLIENT_CORE_CONTEXT_BLIMP_CLIENT_CONTEXT_IMPL_H_ 155 #endif // BLIMP_CLIENT_CORE_CONTEXT_BLIMP_CLIENT_CONTEXT_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698