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..13c0d700b860a939fcbb741e1a8e28e87df6bf91 |
| --- /dev/null |
| +++ b/blimp/client/core/settings/settings_observer.h |
| @@ -0,0 +1,39 @@ |
| +// 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 Settings; |
| + |
| +class SettingsObserver { |
| + public: |
| + virtual ~SettingsObserver(); |
| + |
| + virtual void OnBlimpModeEnabled(bool enable) {} |
|
David Trainor- moved to gerrit
2016/10/01 03:26:35
Comment on these methods (well, mainly on OnRestar
Menglin
2016/10/03 23:08:27
Done.
|
| + virtual void OnShowNetworkStatsChanged(bool enable) {} |
| + virtual void OnRecordWholeDocumentChanged(bool enable) {} |
| + virtual void OnRestartRequired() {} |
| + |
| + Settings* settings() { return settings_; } |
| + |
| + protected: |
| + explicit SettingsObserver(Settings* settings); |
|
David Trainor- moved to gerrit
2016/10/01 03:26:35
I'd get rid of the back pointer and make the owner
Menglin
2016/10/03 23:08:27
Done.
|
| + |
| + private: |
| + // The Settings being tracked by this SettingsObserver. |
| + Settings* settings_; |
|
David Trainor- moved to gerrit
2016/10/01 03:26:35
Follow up on above, remove the back pointer :)
Menglin
2016/10/03 23:08:27
Done.
|
| + |
| + DISALLOW_COPY_AND_ASSIGN(SettingsObserver); |
| +}; |
| + |
| +} // namespace client |
| +} // namespace blimp |
| + |
| +#endif // BLIMP_CLIENT_CORE_SETTINGS_SETTINGS_OBSERVER_H_ |