Chromium Code Reviews| 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..b0151ab33b704ad8c24b0ff7464c80381ba3bdc3 |
| --- /dev/null |
| +++ b/blimp/client/core/settings/settings_observer.h |
| @@ -0,0 +1,41 @@ |
| +// 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 Blimp mode or record_whole_document changed in the Settings. |
|
David Trainor- moved to gerrit
2016/10/05 23:46:21
Make this more generic. Invoked when a settings c
Menglin
2016/10/06 22:36:38
Done.
|
| + virtual void OnRestartRequired() {} |
| + |
| + protected: |
| + SettingsObserver() = default; |
| + |
| + private: |
| + DISALLOW_COPY_AND_ASSIGN(SettingsObserver); |
| +}; |
| + |
| +} // namespace client |
| +} // namespace blimp |
| + |
| +#endif // BLIMP_CLIENT_CORE_SETTINGS_SETTINGS_OBSERVER_H_ |