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

Unified Diff: blimp/client/feature/settings_feature.h

Issue 1810213009: blimp: Add settings to allow the client to download the whole page. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@record_full_document
Patch Set: Use ContentBrowserClient to override prefs. Created 4 years, 9 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
« no previous file with comments | « blimp/client/app/blimp_client_switches.cc ('k') | blimp/client/feature/settings_feature.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: blimp/client/feature/settings_feature.h
diff --git a/blimp/client/feature/settings_feature.h b/blimp/client/feature/settings_feature.h
new file mode 100644
index 0000000000000000000000000000000000000000..eb114ac51e99408b655612dd5e545cfb7f9b23b1
--- /dev/null
+++ b/blimp/client/feature/settings_feature.h
@@ -0,0 +1,45 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef BLIMP_CLIENT_FEATURE_SETTINGS_FEATURE_H_
+#define BLIMP_CLIENT_FEATURE_SETTINGS_FEATURE_H_
+
+#include "base/macros.h"
+#include "blimp/client/blimp_client_export.h"
+#include "blimp/net/blimp_message_processor.h"
+
+namespace blimp {
+namespace client {
+
+// The feature is used to send global settings to the engine.
+class BLIMP_CLIENT_EXPORT SettingsFeature : public BlimpMessageProcessor {
+ public:
+ SettingsFeature();
+ ~SettingsFeature() override;
+
+ // Set the BlimpMessageProcessor that will be used to send
+ // BlimpMessage::SETTINGS messages to the engine.
+ void set_outgoing_message_processor(
+ scoped_ptr<BlimpMessageProcessor> processor);
+
+ void SetRecordWholeDocument(bool record_whole_document);
+
+ private:
+ // BlimpMessageProcessor implementation.
+ void ProcessMessage(scoped_ptr<BlimpMessage> message,
+ const net::CompletionCallback& callback) override;
+
+ // Used to send BlimpMessage::TAB_CONTROL messages to the engine.
+ scoped_ptr<BlimpMessageProcessor> outgoing_message_processor_;
+
+ // Used to avoid sending unnecessary messages to engine.
+ bool record_whole_document_;
+
+ DISALLOW_COPY_AND_ASSIGN(SettingsFeature);
+};
+
+} // namespace client
+} // namespace blimp
+
+#endif // BLIMP_CLIENT_FEATURE_SETTINGS_FEATURE_H_
« no previous file with comments | « blimp/client/app/blimp_client_switches.cc ('k') | blimp/client/feature/settings_feature.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698