Chromium Code Reviews| Index: blimp/client/core/settings/settings_feature.h |
| diff --git a/blimp/client/core/settings/settings_feature.h b/blimp/client/core/settings/settings_feature.h |
| index 18682822cb3fb77c2a27b560241bc27871df23ee..3ad3c0054f9c5af78d23ec97fc1d66b5ef582c5d 100644 |
| --- a/blimp/client/core/settings/settings_feature.h |
| +++ b/blimp/client/core/settings/settings_feature.h |
| @@ -6,15 +6,20 @@ |
| #define BLIMP_CLIENT_CORE_SETTINGS_SETTINGS_FEATURE_H_ |
| #include "base/macros.h" |
| +#include "blimp/client/core/settings/settings_observer.h" |
| #include "blimp/net/blimp_message_processor.h" |
| namespace blimp { |
| namespace client { |
| +class Settings; |
| +class SettingsObserver; |
| + |
| // The feature is used to send global settings to the engine. |
| -class SettingsFeature : public BlimpMessageProcessor { |
| +class SettingsFeature : public BlimpMessageProcessor, |
| + public SettingsObserver { |
| public: |
| - SettingsFeature(); |
| + explicit SettingsFeature(Settings* settings); |
|
David Trainor- moved to gerrit
2016/10/05 23:46:21
Can you describe the expectation that Settings out
Menglin
2016/10/06 22:36:38
Done.
|
| ~SettingsFeature() override; |
| // Set the BlimpMessageProcessor that will be used to send |
| @@ -22,19 +27,23 @@ class SettingsFeature : public BlimpMessageProcessor { |
| void set_outgoing_message_processor( |
| std::unique_ptr<BlimpMessageProcessor> processor); |
| - void SetRecordWholeDocument(bool record_whole_document); |
| void SendUserAgentOSVersionInfo(const std::string& client_os_info); |
| + // SettingsObserver implementation. |
| + void OnRecordWholeDocumentChanged(bool enable) override; |
|
David Trainor- moved to gerrit
2016/10/05 23:46:21
Actually I'm not sure we need this yet.
Menglin
2016/10/06 22:36:38
Done.
|
| + |
| // BlimpMessageProcessor implementation. |
| void ProcessMessage(std::unique_ptr<BlimpMessage> message, |
| const net::CompletionCallback& callback) override; |
| + // Send the necessary settings to the engine. |
| + void PushSettings(); |
| + |
| private: |
| // Used to send BlimpMessage::TAB_CONTROL messages to the engine. |
| std::unique_ptr<BlimpMessageProcessor> outgoing_message_processor_; |
| - // Used to avoid sending unnecessary messages to engine. |
| - bool record_whole_document_; |
| + Settings* settings_; |
| DISALLOW_COPY_AND_ASSIGN(SettingsFeature); |
| }; |