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

Unified Diff: blimp/client/core/settings/settings_feature.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 side-by-side diff with in-line comments
Download patch
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..2234d29f15e1a4a765c65a4a367aa9b5f5d5ed3d 100644
--- a/blimp/client/core/settings/settings_feature.h
+++ b/blimp/client/core/settings/settings_feature.h
@@ -11,10 +11,13 @@
namespace blimp {
namespace client {
+class Settings;
+
// The feature is used to send global settings to the engine.
class SettingsFeature : public BlimpMessageProcessor {
public:
- SettingsFeature();
+ // Caller ensures |settings| outlives this object.
+ explicit SettingsFeature(Settings* settings);
~SettingsFeature() override;
// Set the BlimpMessageProcessor that will be used to send
@@ -22,19 +25,20 @@ 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);
// 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);
};

Powered by Google App Engine
This is Rietveld 408576698