OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROMECAST_GRAPHICS_CAST_VSYNC_SETTINGS_H_ | 5 #ifndef CHROMECAST_GRAPHICS_CAST_VSYNC_SETTINGS_H_ |
6 #define CHROMECAST_GRAPHICS_CAST_VSYNC_SETTINGS_H_ | 6 #define CHROMECAST_GRAPHICS_CAST_VSYNC_SETTINGS_H_ |
7 | 7 |
8 #include "base/lazy_instance.h" | 8 #include "base/lazy_instance.h" |
9 #include "base/macros.h" | 9 #include "base/macros.h" |
10 #include "base/observer_list.h" | 10 #include "base/observer_list.h" |
(...skipping 14 matching lines...) Expand all Loading... |
25 | 25 |
26 static CastVSyncSettings* GetInstance(); | 26 static CastVSyncSettings* GetInstance(); |
27 | 27 |
28 base::TimeDelta GetVSyncInterval() const; | 28 base::TimeDelta GetVSyncInterval() const; |
29 void SetVSyncInterval(base::TimeDelta interval); | 29 void SetVSyncInterval(base::TimeDelta interval); |
30 | 30 |
31 void AddObserver(Observer* observer); | 31 void AddObserver(Observer* observer); |
32 void RemoveObserver(Observer* observer); | 32 void RemoveObserver(Observer* observer); |
33 | 33 |
34 private: | 34 private: |
35 friend struct base::DefaultLazyInstanceTraits<CastVSyncSettings>; | 35 friend struct base::LazyInstanceTraitsBase<CastVSyncSettings>; |
36 | 36 |
37 CastVSyncSettings(); | 37 CastVSyncSettings(); |
38 ~CastVSyncSettings(); | 38 ~CastVSyncSettings(); |
39 | 39 |
40 base::TimeDelta interval_; | 40 base::TimeDelta interval_; |
41 base::ObserverList<Observer> observers_; | 41 base::ObserverList<Observer> observers_; |
42 | 42 |
43 DISALLOW_COPY_AND_ASSIGN(CastVSyncSettings); | 43 DISALLOW_COPY_AND_ASSIGN(CastVSyncSettings); |
44 }; | 44 }; |
45 | 45 |
46 } // namespace chromecast | 46 } // namespace chromecast |
47 | 47 |
48 #endif // CHROMECAST_GRAPHICS_CAST_VSYNC_SETTINGS_H_ | 48 #endif // CHROMECAST_GRAPHICS_CAST_VSYNC_SETTINGS_H_ |
OLD | NEW |