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

Unified Diff: blimp/client/core/settings/settings_observer.h

Issue 2349073002: Blimp Settings framework on the c++ side (Closed)
Patch Set: nits and sync to head 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
« no previous file with comments | « blimp/client/core/settings/settings_feature.cc ('k') | blimp/client/core/settings/settings_prefs.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: blimp/client/core/settings/settings_observer.h
diff --git a/blimp/client/core/settings/settings_observer.h b/blimp/client/core/settings/settings_observer.h
new file mode 100644
index 0000000000000000000000000000000000000000..6b1b7c2a026ea355d3b961cc96a2b4a54d17c9e9
--- /dev/null
+++ b/blimp/client/core/settings/settings_observer.h
@@ -0,0 +1,42 @@
+// 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_CORE_SETTINGS_SETTINGS_OBSERVER_H_
+#define BLIMP_CLIENT_CORE_SETTINGS_SETTINGS_OBSERVER_H_
+
+#include "base/observer_list.h"
+
+namespace blimp {
+namespace client {
+
+class SettingsObserver {
+ public:
+ virtual ~SettingsObserver() = default;
+
+ // Invoked when enabling or disabling Blimp mode in the Settings.
+ virtual void OnBlimpModeEnabled(bool enable) {}
+
+ // Invoked when enabling or disabling to show the network stats in the
+ // Settings.
+ virtual void OnShowNetworkStatsChanged(bool enable) {}
+
+ // Invoked when enabling or disabling to download the whole document in the
+ // Settings.
+ virtual void OnRecordWholeDocumentChanged(bool enable) {}
+
+ // Invoked when a setting changed that requires the application to restart
+ // before it can take effect.
+ virtual void OnRestartRequired() {}
+
+ protected:
+ SettingsObserver() = default;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(SettingsObserver);
+};
+
+} // namespace client
+} // namespace blimp
+
+#endif // BLIMP_CLIENT_CORE_SETTINGS_SETTINGS_OBSERVER_H_
« no previous file with comments | « blimp/client/core/settings/settings_feature.cc ('k') | blimp/client/core/settings/settings_prefs.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698