OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 UI_COMPOSITOR_COMPOSITOR_VSYNC_MANAGER_H_ | 5 #ifndef UI_COMPOSITOR_COMPOSITOR_VSYNC_MANAGER_H_ |
6 #define UI_COMPOSITOR_COMPOSITOR_VSYNC_MANAGER_H_ | 6 #define UI_COMPOSITOR_COMPOSITOR_VSYNC_MANAGER_H_ |
7 | 7 |
8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
9 #include "base/observer_list.h" | 9 #include "base/observer_list.h" |
10 #include "base/synchronization/lock.h" | 10 #include "base/synchronization/lock.h" |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 void AddObserver(Observer* observer); | 44 void AddObserver(Observer* observer); |
45 void RemoveObserver(Observer* observer); | 45 void RemoveObserver(Observer* observer); |
46 | 46 |
47 private: | 47 private: |
48 friend class base::RefCounted<CompositorVSyncManager>; | 48 friend class base::RefCounted<CompositorVSyncManager>; |
49 | 49 |
50 ~CompositorVSyncManager(); | 50 ~CompositorVSyncManager(); |
51 | 51 |
52 void NotifyObservers(base::TimeTicks timebase, base::TimeDelta interval); | 52 void NotifyObservers(base::TimeTicks timebase, base::TimeDelta interval); |
53 | 53 |
54 ObserverList<Observer> observer_list_; | 54 base::ObserverList<Observer> observer_list_; |
55 | 55 |
56 base::TimeTicks last_timebase_; | 56 base::TimeTicks last_timebase_; |
57 base::TimeDelta last_interval_; | 57 base::TimeDelta last_interval_; |
58 base::TimeDelta authoritative_vsync_interval_; | 58 base::TimeDelta authoritative_vsync_interval_; |
59 | 59 |
60 DISALLOW_COPY_AND_ASSIGN(CompositorVSyncManager); | 60 DISALLOW_COPY_AND_ASSIGN(CompositorVSyncManager); |
61 }; | 61 }; |
62 | 62 |
63 } // namespace ui | 63 } // namespace ui |
64 | 64 |
65 #endif // UI_COMPOSITOR_COMPOSITOR_VSYNC_MANAGER_H_ | 65 #endif // UI_COMPOSITOR_COMPOSITOR_VSYNC_MANAGER_H_ |
OLD | NEW |