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

Side by Side Diff: blimp/client/core/settings/settings_observer.h

Issue 2349073002: Blimp Settings framework on the c++ side (Closed)
Patch Set: Settings doesn't own its observer anymore. SettingsFeature subclass SettingsObserver 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef BLIMP_CLIENT_CORE_SETTINGS_SETTINGS_OBSERVER_H_
6 #define BLIMP_CLIENT_CORE_SETTINGS_SETTINGS_OBSERVER_H_
7
8 #include "base/observer_list.h"
9
10 namespace blimp {
11 namespace client {
12
13 class Settings;
14
15 class SettingsObserver {
16 public:
17 virtual ~SettingsObserver();
18
19 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.
20 virtual void OnShowNetworkStatsChanged(bool enable) {}
21 virtual void OnRecordWholeDocumentChanged(bool enable) {}
22 virtual void OnRestartRequired() {}
23
24 Settings* settings() { return settings_; }
25
26 protected:
27 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.
28
29 private:
30 // The Settings being tracked by this SettingsObserver.
31 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.
32
33 DISALLOW_COPY_AND_ASSIGN(SettingsObserver);
34 };
35
36 } // namespace client
37 } // namespace blimp
38
39 #endif // BLIMP_CLIENT_CORE_SETTINGS_SETTINGS_OBSERVER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698